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 @@ -196,7 +196,14 @@ class SyncManager: global_id, exists = GlobalId.from_xml_element(tag_id) signatures = SyncManager._verify_model(global_id, content_str, tag_model) - update_time = tag_content.find(TAG_UPDATE_TIME).text + pub_time = tag_content.find(TAG_PUB_TIME).text + + tag_update_time = tag_content.find(TAG_UPDATE_TIME) + if tag_update_time: + update_time = tag_content.find(TAG_UPDATE_TIME).text + else: + update_time = pub_time + is_old = exists and global_id.post.last_edit_time < parse_datetime(update_time) if exists and not is_old: logger.debug('Post {} exists and is up to date.'.format(global_id)) @@ -215,7 +222,6 @@ class SyncManager: else: tripcode = '' - pub_time = tag_content.find(TAG_PUB_TIME).text thread = tag_content.find(TAG_THREAD) tags = [] if thread: