rrs/models.py: fix RecipeMaintainerHistory get_by_end_date.

If not maintainer info is found return None instead of the first
one entry in the table, this made reporting more consistency.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
This commit is contained in:
Aníbal Limón 2015-01-28 18:10:13 -06:00 committed by Paul Eggleton
parent ac485c0cc4
commit b8e16428d8

View File

@ -106,7 +106,7 @@ class RecipeMaintainerHistory(models.Model):
if rmh_qry:
return rmh_qry[0]
else:
return RecipeMaintainerHistory.objects.filter().order_by('date')[0]
return None
def __unicode__(self):
return "%s: %s, %s" % (self.date, self.author.name, self.sha1[:10])