Update src/pretix/base/migrations/0302_resolve_duplicate_codes_and_secrets.py

Co-authored-by: Martin Gross <gross@rami.io>
This commit is contained in:
Raphael Michel
2026-07-07 17:20:33 +02:00
committed by GitHub
co-authored by Martin Gross
parent aedd133bcd
commit c1b5bcf2e4
@@ -19,7 +19,7 @@ def clean_duplicate_secrets(apps, schema_editor):
affected = OrderPosition.all.filter(
**{k: v for k, v in row.items() if k != "c"}
).order_by("pk")
logger.error(f"Found {row['c']} tickets with with the same secret \"{row["secret"]}\" in organizer {row['order__event__organizer_id']}, all except one will be changed")
logger.error(f"Found {row['c']} tickets with with the same secret \"{row['secret']}\" in organizer {row['order__event__organizer_id']}, all except one will be changed")
for i, a in enumerate(affected):
if i > 0:
a.secret = a.secret + "__dupl__" + str(a.pk)