Skip to content

Commit

Permalink
Initialize 'parameters' key if it does not exist
Browse files Browse the repository at this point in the history
bsquizz committed Jul 26, 2021
1 parent 2a1c10a commit d0040c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bonfire/qontract.py
Original file line number Diff line number Diff line change
@@ -308,8 +308,10 @@ def sub_refs(apps, ref_env_name):
if ref_component:
final_component = final_apps[app_name]["components"][idx]
final_component["ref"] = ref_component["ref"]
ref_image_tag = ref_component["parameters"].get("IMAGE_TAG")
ref_image_tag = ref_component.get("parameters", {}).get("IMAGE_TAG")
if ref_image_tag:
if "parameters" not in final_component:
final_component["parameters"] = {}
final_component["parameters"]["IMAGE_TAG"] = ref_image_tag
log.debug(
"app: '%s' component: '%s' -- using ref from env '%s': %s%s",

0 comments on commit d0040c5

Please sign in to comment.