mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-12-11 18:45:34 +00:00
Minor fix to 'last changed' field, simplify template and logic
This commit is contained in:
@@ -113,10 +113,10 @@ class perform_site_check():
|
||||
fetched_md5 = hashlib.md5(stripped_text_from_html.encode('utf-8')).hexdigest()
|
||||
|
||||
|
||||
if self.current_md5 != fetched_md5:
|
||||
if self.current_md5 != fetched_md5: # could be None or False depending on JSON type
|
||||
|
||||
# Don't confuse people by updating as last-changed, when it actually just changed from None..
|
||||
if self.datastore.get_val(self.uuid, 'previous_md5') is not None:
|
||||
if self.datastore.get_val(self.uuid, 'previous_md5'):
|
||||
self.update_obj["last_changed"] = self.timestamp
|
||||
|
||||
self.update_obj["previous_md5"] = fetched_md5
|
||||
|
||||
Reference in New Issue
Block a user