##// END OF EJS Templates
If there is no post update time, use pub time
neko259 -
r2098:c4ac6a57 default
parent child Browse files
Show More
@@ -196,7 +196,14 b' class SyncManager:'
196 global_id, exists = GlobalId.from_xml_element(tag_id)
196 global_id, exists = GlobalId.from_xml_element(tag_id)
197 signatures = SyncManager._verify_model(global_id, content_str, tag_model)
197 signatures = SyncManager._verify_model(global_id, content_str, tag_model)
198
198
199 update_time = tag_content.find(TAG_UPDATE_TIME).text
199 pub_time = tag_content.find(TAG_PUB_TIME).text
200
201 tag_update_time = tag_content.find(TAG_UPDATE_TIME)
202 if tag_update_time:
203 update_time = tag_content.find(TAG_UPDATE_TIME).text
204 else:
205 update_time = pub_time
206
200 is_old = exists and global_id.post.last_edit_time < parse_datetime(update_time)
207 is_old = exists and global_id.post.last_edit_time < parse_datetime(update_time)
201 if exists and not is_old:
208 if exists and not is_old:
202 logger.debug('Post {} exists and is up to date.'.format(global_id))
209 logger.debug('Post {} exists and is up to date.'.format(global_id))
@@ -215,7 +222,6 b' class SyncManager:'
215 else:
222 else:
216 tripcode = ''
223 tripcode = ''
217
224
218 pub_time = tag_content.find(TAG_PUB_TIME).text
219 thread = tag_content.find(TAG_THREAD)
225 thread = tag_content.find(TAG_THREAD)
220 tags = []
226 tags = []
221 if thread:
227 if thread:
General Comments 0
You need to be logged in to leave comments. Login now