Fix delete lp list index out of range error
@@ -64,7 +64,8 @@ class LanguagePackHandler(handler.Handler):
# to 'app deploy' requests.
if hasattr(plan, 'raw_content') and plan.raw_content:
if plan.raw_content and 'artifacts' in plan.raw_content:
- lp = plan.raw_content['artifacts'][0]['language_pack']
+ for artifact in plan.raw_content['artifacts']:
+ lp = artifact.get('language_pack', '')
if lp == db_obj.name or lp == db_obj.uuid:
return True
