Skip to content

Commit c7eebc2

Browse files
authored
Fix AttributeError (atlassian-api#1046)
'Response' object has no attribute 'get'
1 parent ed374f6 commit c7eebc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

atlassian/service_desk.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ def attach_temporary_file(self, service_desk_id, filename):
492492
experimental_headers["X-Atlassian-Token"] = "no-check"
493493

494494
with open(filename, "rb") as file:
495-
result = self.post(path=url, headers=experimental_headers, files={"file": file}).get("temporaryAttachments")
495+
result = self.post(path=url, headers=experimental_headers, files={"file": file}).json().get("temporaryAttachments")
496496
temp_attachment_id = result[0].get("temporaryAttachmentId")
497497

498498
return temp_attachment_id

0 commit comments

Comments
 (0)