Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 92b9b8c

Browse files
authored
Fix NPE in build trigger if the template returns a None (quay#395)
1 parent 26c659e commit 92b9b8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

buildtrigger/basehandler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ def _determine_tags(cls, config, metadata):
380380
for tag_template in tag_templates:
381381
try:
382382
result = apply_data_to_obj(tag_template, updated_metadata, missing="$MISSING$")
383-
if "$MISSING$" in result:
383+
if result and "$MISSING$" in result:
384384
result = None
385385
except JSONTemplateParseException:
386386
logger.exception("Got except when parsing tag template `%s`", tag_template)

0 commit comments

Comments
 (0)