mirror of https://github.com/zulip/zulip.git
hipchat: Skip attachments without paths.
This is a short term workaround. Some variants of HipChat exports are missing `path`, and we just punt for now.
This commit is contained in:
parent
546fd5d60e
commit
aff84cd1e9
|
@ -22,9 +22,14 @@ class AttachmentHandler:
|
|||
if not attachment:
|
||||
return None
|
||||
|
||||
name = attachment['name']
|
||||
|
||||
if 'path' not in attachment:
|
||||
logging.info('Skipping HipChat attachment with missing path data: ' + name)
|
||||
return None
|
||||
|
||||
size = attachment['size']
|
||||
path = attachment['path']
|
||||
name = attachment['name']
|
||||
|
||||
local_fn = os.path.join(files_dir, path)
|
||||
|
||||
|
|
Loading…
Reference in New Issue