diff --git a/openqa_review/openqa_review.py b/openqa_review/openqa_review.py index 3ff5e1d..ea1b781 100755 --- a/openqa_review/openqa_review.py +++ b/openqa_review/openqa_review.py @@ -1008,9 +1008,14 @@ def _get_bugref_for_softfailed_module(self, result_item, module_name): if match: return (match.group(1), False) # custom results can have soft-fail as well - if "result" in field and "softfail" in field["result"]: + elif "result" in field and "title" in field and "softfail" in field["result"]: match = re.search(bugref_regex, field["title"]) - elif "properties" in field and len(field["properties"]) > 0 and field["properties"][0] == "workaround": + elif ( + "properties" in field + and "needle" in field + and len(field["properties"]) > 0 + and field["properties"][0] == "workaround" + ): log.debug("Evaluating potential workaround needle '%s'" % field["needle"]) match = re.search(bugref_regex, field["needle"]) if not match: # pragma: no cover