Skip to content

Commit 43cf3b9

Browse files
committed
Fixed a small issue where the response parsing was throwing errors
1 parent ae4d040 commit 43cf3b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

commanderbot/ext/jira/jira_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ async def _fetch_issue_json(self, query: JiraQuery) -> JsonObject:
5757
async def get_issue(self, query: JiraQuery) -> JiraIssue:
5858
# Fetch issue and raise an exception we got no results
5959
data: JsonObject = await self._fetch_issue_json(query)
60-
if data["total"] != 1:
60+
if len(data.get("issues", 0)) != 1:
6161
raise IssueNotFound(query.issue_id)
6262

6363
# Extract the issue's fields

0 commit comments

Comments
 (0)