mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:49:01 +02:00
rrs: Add support to display version by Milestone based on RecipeUpgrade's
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
This commit is contained in:
parent
22af5216de
commit
446220e8c9
|
@ -255,6 +255,16 @@ class RecipeUpgrade(models.Model):
|
|||
author_date = models.DateTimeField()
|
||||
commit_date = models.DateTimeField()
|
||||
|
||||
@staticmethod
|
||||
def get_by_recipe_and_date(recipe, current_date):
|
||||
rup_qry = RecipeUpgrade.objects.filter(recipe = recipe,
|
||||
commit_date__lte = current_date).order_by('commit_date')
|
||||
|
||||
if rup_qry:
|
||||
return rup_qry[0]
|
||||
else:
|
||||
return None
|
||||
|
||||
def short_sha1(self):
|
||||
return self.sha1[0:6]
|
||||
|
||||
|
|
|
@ -137,7 +137,13 @@ class RecipeListView(ListView):
|
|||
current_date <= milestone.end_date:
|
||||
version = recipe.pv
|
||||
else:
|
||||
version = '' # Implement recipe version history
|
||||
version = ''
|
||||
|
||||
rup = RecipeUpgrade.get_by_recipe_and_date(recipe,
|
||||
milestone.end_date)
|
||||
|
||||
if not rup is None:
|
||||
version = rup.version
|
||||
|
||||
recipe_upstream = RecipeUpstream.get_by_recipe_and_history(
|
||||
recipe, recipe_upstream_history)
|
||||
|
|
Loading…
Reference in New Issue
Block a user