Skip to content

Commit 2e8e1b0

Browse files
author
gkowalc
committed
fixing minor issue in scrap_regex_from_issue method
1 parent a100d4f commit 2e8e1b0

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

atlassian/jira.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,15 +1548,16 @@ def scrap_regex_from_issue(self, issue, regex):
15481548
comments = issue_output["fields"]["comment"]["comments"]
15491549

15501550
try:
1551-
description_matches = [x.group(0) for x in re.finditer(regex, description)]
1552-
if description_matches:
1553-
regex_output.extend(description_matches)
1554-
1555-
for comment in comments:
1556-
comment_html = comment["body"]
1557-
comment_matches = [x.group(0) for x in re.finditer(regex, comment_html)]
1558-
if comment_matches:
1559-
regex_output.extend(comment_matches)
1551+
if description is not None:
1552+
description_matches = [x.group(0) for x in re.finditer(regex, description)]
1553+
if description_matches:
1554+
regex_output.extend(description_matches)
1555+
1556+
for comment in comments:
1557+
comment_html = comment["body"]
1558+
comment_matches = [x.group(0) for x in re.finditer(regex, comment_html)]
1559+
if comment_matches:
1560+
regex_output.extend(comment_matches)
15601561

15611562
return regex_output
15621563
except HTTPError as e:

0 commit comments

Comments
 (0)