# HG changeset patch # User neko259 # Date 2017-01-25 08:39:38 # Node ID 4c8bff54072f754accd4cd26ff5b3333ded1a5f7 # Parent c7821a56853ca58c155dbf3a2d389aefa4ecc073 Do not try to add an attachment ref for external attachment if there is an internal and external attachment in the same post diff --git a/boards/models/post/sync.py b/boards/models/post/sync.py --- a/boards/models/post/sync.py +++ b/boards/models/post/sync.py @@ -334,7 +334,7 @@ class SyncManager: attachment_tag.set(ATTR_ID_TYPE, ID_TYPE_URL) attachment_tag.text = attachment.url - if tag_refs is not None: + if tag_refs is not None and attachment.is_internal(): attachment_ref = et.SubElement(tag_refs, TAG_ATTACHMENT_REF) attachment_ref.set(ATTR_REF, attachment.hash) attachment_ref.set(ATTR_URL, attachment.file.url)