mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
rrs: fix broken links when there are no milestones in a release
If a release has no milestones, we shouldn't be selecting it as the default to be linked to in the maintenance plan drop-down, so filter those out. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
575b6bc180
commit
dac47659ca
|
@ -33,7 +33,7 @@ class MaintenancePlan(models.Model):
|
||||||
maintainer_style = models.CharField(max_length=1, choices=MAINTENANCEPLAN_MAINTAINER_STYLE, default='L', help_text='Maintainer tracking style for the layers within this plan')
|
maintainer_style = models.CharField(max_length=1, choices=MAINTENANCEPLAN_MAINTAINER_STYLE, default='L', help_text='Maintainer tracking style for the layers within this plan')
|
||||||
|
|
||||||
def get_default_release(self):
|
def get_default_release(self):
|
||||||
return self.release_set.last()
|
return self.release_set.filter(milestone__isnull=False).last()
|
||||||
|
|
||||||
def per_recipe_maintainers(self):
|
def per_recipe_maintainers(self):
|
||||||
return self.maintainer_style != 'L'
|
return self.maintainer_style != 'L'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user