Skip to content

[Jira] Fix get_attachment_content() return the content as bytes instead of str #1433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions atlassian/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,11 @@
"""
Returns the content for an attachment
:param attachment_id: int
:return: json
:return: content as bytes
"""
base_url = self.resource_url("attachment")
url = "{base_url}/content/{attachment_id}".format(base_url=base_url, attachment_id=attachment_id)
return self.get(url)
return self.get(url, not_json_response=True)

Check warning on line 291 in atlassian/jira.py

View check run for this annotation

Codecov / codecov/patch

atlassian/jira.py#L291

Added line #L291 was not covered by tests

def remove_attachment(self, attachment_id):
"""
Expand Down