From 748201ec2b17852e68be3ae68665b45fd3082adb Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sat, 5 Nov 2022 22:32:43 +0100 Subject: [PATCH] generate_preference_list: Revert Tag table auto incr value - not reverted by default when ROLLBACK on MariaDB is issued - resetting to 1 works because DB will still ensure no duplicates occure --- server/entertainment_decider/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/server/entertainment_decider/models.py b/server/entertainment_decider/models.py index da024e4..93ab86e 100644 --- a/server/entertainment_decider/models.py +++ b/server/entertainment_decider/models.py @@ -416,6 +416,7 @@ def generate_preference_list( base = base.adapt_score(first_element, score_adapt) element_list = object_gen() orm.rollback() + db.execute(f"ALTER TABLE {Tag._table_} AUTO_INCREMENT = 1;") return [MediaElement[i] for i in res_ids]