From 0aa2276afbbe336148226338c68a237090b73787 Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Thu, 7 Sep 2023 10:36:34 +0200 Subject: [PATCH] UI - Fixing update for sort by "date created" or "#" in watch overview table ( #1775 ) --- changedetectionio/store.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/changedetectionio/store.py b/changedetectionio/store.py index 48443b53..82777067 100644 --- a/changedetectionio/store.py +++ b/changedetectionio/store.py @@ -778,15 +778,6 @@ class ChangeDetectionStore: continue return - # We don't know when the date_created was in the past until now, so just add an index number for now. - def update_11(self): - i = 0 - for uuid, watch in self.data['watching'].items(): - if not watch.get('date_created'): - watch['date_created'] = i - i+=1 - return - # Create tag objects and their references from existing tag text def update_12(self): i = 0 @@ -800,3 +791,11 @@ class ChangeDetectionStore: self.data['watching'][uuid]['tags'] = tag_uuids + # #1775 - Update 11 did not update the records correctly when adding 'date_created' values for sorting + def update_13(self): + i = 0 + for uuid, watch in self.data['watching'].items(): + if not watch.get('date_created'): + self.data['watching'][uuid]['date_created'] = i + i+=1 + return \ No newline at end of file