[IMP] mis_builder: update min/max function signatures

so min(x, y, ...) and min([x, y, ..]) both work as expected.
pull/116/head
Stéphane Bidoul 2015-08-28 14:45:28 +02:00
parent d3ab39e994
commit 9cad3666ad
1 changed files with 4 additions and 4 deletions

View File

@ -81,16 +81,16 @@ def _avg(l):
return sum(l) / float(len(l)) return sum(l) / float(len(l))
def _min(l): def _min(*l):
if not l: if not l:
return None return None
return min(l) return min(*l)
def _max(l): def _max(*l):
if not l: if not l:
return None return None
return max(l) return max(*l)
class MisReportKpi(models.Model): class MisReportKpi(models.Model):