mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:49:01 +02:00
rrs/tools/rrs_maintainer_history.py: Set new recipes to No maintainer if don't have
When add new recipes sometimes don't have maintainer defined causing errors on frontend when search for one. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
This commit is contained in:
parent
abc3ba594f
commit
4f5d5a7784
|
@ -148,6 +148,19 @@ def maintainer_history(logger):
|
|||
utils.runcmd("git checkout master -f", pokypath, logger=logger)
|
||||
utils.runcmd("git branch -D %s" % (branchname), pokypath, logger=logger)
|
||||
|
||||
# set new recipes to no maintainer if don't have one
|
||||
m = Maintainer.objects.get(id = 0) # No Maintainer
|
||||
rms = RecipeMaintainerHistory.get_last()
|
||||
for recipe in Recipe.objects.all():
|
||||
if not RecipeMaintainer.objects.filter(recipe = recipe, history = rms):
|
||||
rm = RecipeMaintainer()
|
||||
rm.recipe = recipe
|
||||
rm.maintainer = m
|
||||
rm.history = rms
|
||||
rm.save()
|
||||
logger.debug("%s: New recipe not found maintainer set to 'No maintainer'." % \
|
||||
(recipe.pn))
|
||||
|
||||
transaction.commit()
|
||||
transaction.leave_transaction_management()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user