mirror of
https://github.com/pretix/pretix.git
synced 2026-08-03 09:37:51 +00:00
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:
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)
|
||||
|
||||
Reference in New Issue
Block a user