##// 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 196 global_id, exists = GlobalId.from_xml_element(tag_id)
197 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 207 is_old = exists and global_id.post.last_edit_time < parse_datetime(update_time)
201 208 if exists and not is_old:
202 209 logger.debug('Post {} exists and is up to date.'.format(global_id))
@@ -215,7 +222,6 b' class SyncManager:'
215 222 else:
216 223 tripcode = ''
217 224
218 pub_time = tag_content.find(TAG_PUB_TIME).text
219 225 thread = tag_content.find(TAG_THREAD)
220 226 tags = []
221 227 if thread:
General Comments 0
You need to be logged in to leave comments. Login now