[IMP] mis_builder: update min/max function signatures
so min(x, y, ...) and min([x, y, ..]) both work as expected.pull/116/head
parent
d3ab39e994
commit
9cad3666ad
|
@ -81,16 +81,16 @@ def _avg(l):
|
|||
return sum(l) / float(len(l))
|
||||
|
||||
|
||||
def _min(l):
|
||||
def _min(*l):
|
||||
if not l:
|
||||
return None
|
||||
return min(l)
|
||||
return min(*l)
|
||||
|
||||
|
||||
def _max(l):
|
||||
def _max(*l):
|
||||
if not l:
|
||||
return None
|
||||
return max(l)
|
||||
return max(*l)
|
||||
|
||||
|
||||
class MisReportKpi(models.Model):
|
||||
|
|
Loading…
Reference in New Issue