mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
rrs/models.py: RecipeMaintainerHistory if not found return the first record
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
This commit is contained in:
parent
8def265a02
commit
f042c706da
|
@ -153,6 +153,11 @@ class RecipeMaintainerHistory(models.Model):
|
|||
rmh_qry = RecipeMaintainerHistory.objects.filter(
|
||||
date__lte = end_date).order_by('-date')
|
||||
|
||||
if rmh_qry:
|
||||
return rmh_qry[0]
|
||||
|
||||
rmh_qry = RecipeMaintainerHistory.objects.filter(
|
||||
).order_by('date')
|
||||
if rmh_qry:
|
||||
return rmh_qry[0]
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user