bug fix: last_changed was being set on the first fetch, should only be set on the change after the first fetch #705

This commit is contained in:
dgtlmoon
2022-06-23 09:41:55 +02:00
committed by GitHub
parent 5bfdb28bd2
commit 83555a9991
6 changed files with 17 additions and 10 deletions

View File

@@ -298,7 +298,7 @@ def changedetection_app(config=None, datastore_o=None):
# Sort by last_changed and add the uuid which is usually the key..
sorted_watches = []
# @todo needs a .itemsWithTag() or something
# @todo needs a .itemsWithTag() or something - then we can use that in Jinaj2 and throw this away
for uuid, watch in datastore.data['watching'].items():
if limit_tag != None:
@@ -403,8 +403,6 @@ def changedetection_app(config=None, datastore_o=None):
watch['uuid'] = uuid
sorted_watches.append(watch)
sorted_watches.sort(key=lambda x: x['last_changed'], reverse=True)
existing_tags = datastore.get_all_tags()
form = forms.quickWatchForm(request.form)