From fb217303e25622b6202bfb0596c7e49a879048df Mon Sep 17 00:00:00 2001 From: Chris <105302830+datengraben@users.noreply.github.com> Date: Tue, 21 May 2024 14:28:27 +0200 Subject: [PATCH 1/2] update_features: Fix update flag if hashes match This fixes the case, if computed content hashes match, to set update = False instead of True. This prevents the reset of `validates_count` of database-features, that are the same in the set of upload-features. --- www/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/util.py b/www/util.py index ed155b2..de0e8a3 100644 --- a/www/util.py +++ b/www/util.py @@ -41,7 +41,7 @@ def update_features(project, features, audit): feat = ref2feat[ref] if feat.feature_md5 != md5_hex: update = True - update = True + update = False else: feat = Feature(project=project, ref=ref) feat.validates_count = 0 From 8bbd948c5340926b76ee8fc1234d892fe44f7e5c Mon Sep 17 00:00:00 2001 From: Chris <105302830+datengraben@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:32:50 +0200 Subject: [PATCH 2/2] Fixes update flag when hex don't match --- www/util.py | 1 - 1 file changed, 1 deletion(-) diff --git a/www/util.py b/www/util.py index de0e8a3..df3521b 100644 --- a/www/util.py +++ b/www/util.py @@ -41,7 +41,6 @@ def update_features(project, features, audit): feat = ref2feat[ref] if feat.feature_md5 != md5_hex: update = True - update = False else: feat = Feature(project=project, ref=ref) feat.validates_count = 0