mirror of
https://github.com/pretix/pretix.git
synced 2026-08-11 10:57:00 +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
c1b5bcf2e4
commit
f45940d3e3
@@ -33,7 +33,7 @@ def clean_duplicate_secrets(apps, schema_editor):
|
||||
affected = Order.objects.filter(
|
||||
**{k: v for k, v in row.items() if k != "c"}
|
||||
).order_by("pk")
|
||||
logger.error(f"Found {row['c']} orders with with the same code \"{row["code"]}\" in organizer {row['event__organizer_id']}, all except one will be changed")
|
||||
logger.error(f"Found {row['c']} orders with with the same code \"{row['code']}\" in organizer {row['event__organizer_id']}, all except one will be changed")
|
||||
for i, a in enumerate(affected):
|
||||
if i > 0:
|
||||
if len(a.code) > 16 - len(str(a.pk)):
|
||||
|
||||
Reference in New Issue
Block a user