Skip to content

Commit

Permalink
Merge pull request #12 : FIX: handle attachments without type
Browse files Browse the repository at this point in the history
FIX: handle attachments without type
  • Loading branch information
tmichela authored Mar 8, 2022
2 parents 3bbe579 + 98b99a3 commit 164fd47
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions redmine_zulip/redmine.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,15 @@ def _publish_attachment(self, issue, ticket):

if attachment.id in known_attachments:
continue
if (
elif not hasattr(attachment, 'content_type'):
pass
elif (
attachment.content_type == 'application/octet-stream' and
attachment.filename.endswith('.eml')
):
new_attachments.append(attachment.id)
continue
if 'image' in attachment.content_type:
elif 'image' in attachment.content_type:
res = self.upload_attachment(attachment)
uri = res['uri']

Expand Down

0 comments on commit 164fd47

Please sign in to comment.