Do not allow currency codes that to not represent money (#4056)

* Do not allow currency codes that to not represent money

* Rebase migration

* Fix blacklist
This commit is contained in:
Raphael Michel
2024-04-22 16:22:30 +02:00
committed by GitHub
parent 79d59553d7
commit 0f696f42f6
5 changed files with 45 additions and 1 deletions

View File

@@ -0,0 +1,26 @@
# Generated by Django 4.2.10 on 2024-04-09 07:32
from django.db import migrations
def change_currencies(apps, schema_editor):
Event = apps.get_model("pretixbase", "Event")
Event.objects.filter(
currency__in={
'XAG', 'XAU', 'XBA', 'XBB', 'XBC', 'XBD', 'XDR', 'XPD', 'XPT', 'XSU', 'XTS', 'XUA',
}
).update(currency='XXX')
class Migration(migrations.Migration):
dependencies = [
("pretixbase", "0262_subevent_comment"),
]
operations = [
migrations.RunPython(
change_currencies, migrations.RunPython.noop
)
]