From 27925093e2324bc31532a1246ca89f72e3d13b2c Mon Sep 17 00:00:00 2001 From: Lars Date: Sat, 17 Oct 2026 07:25:03 +0200 Subject: [PATCH] Behebe den Startabbruch, weil psycopg die Sammelabfrage nur auf dem Cursor kennt. Co-authored-by: Cursor --- backend/app/fixtures.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/app/fixtures.py b/backend/app/fixtures.py index 40f4da9..84e8962 100644 --- a/backend/app/fixtures.py +++ b/backend/app/fixtures.py @@ -169,7 +169,11 @@ def purge_fixture_data(settings: Settings | None = None) -> int: conn.rollback() return 0 conn.execute("CREATE TEMP TABLE fixture_accounts (id uuid PRIMARY KEY) ON COMMIT DROP") - conn.executemany("INSERT INTO fixture_accounts (id) VALUES (%s)", [(row["id"],) for row in fixtures]) + with conn.cursor() as cur: + cur.executemany( + "INSERT INTO fixture_accounts (id) VALUES (%s)", + [(row["id"],) for row in fixtures], + ) assets = conn.execute( "SELECT id FROM media_assets WHERE owner_subject_id IN (SELECT id FROM fixture_accounts)" ).fetchall()