forked from CGM_Public/pretix_original
28 lines
771 B
Python
28 lines
771 B
Python
# Generated by Django 3.2.16 on 2022-12-21 08:59
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
def item_set_personalized(apps, schema_editor):
|
|
# We cannot really know if a position was bundled or an add-on, but we can at least guess
|
|
Item = apps.get_model("pretixbase", "Item")
|
|
Item.objects.filter(admission=True).update(personalized=True)
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
('pretixbase', '0226_itemvariationmetavalue'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name='item',
|
|
name='personalized',
|
|
field=models.BooleanField(default=False),
|
|
),
|
|
migrations.RunPython(
|
|
item_set_personalized,
|
|
migrations.RunPython.noop,
|
|
),
|
|
]
|