forked from CGM_Public/pretix_original
* New data model for default tax rule * Remove misleading empty label when field is not optional * Allow to split cancellation fee * Fix API and tests * Update migration * Update src/tests/api/test_taxrules.py Co-authored-by: luelista <weller@rami.io> * Update src/tests/api/test_taxrules.py Co-authored-by: luelista <weller@rami.io> * Review note * Update src/pretix/base/models/tax.py Co-authored-by: luelista <weller@rami.io> * Flip API behaviour for default * Fix failing tests * Fix failing test * Split migration --------- Co-authored-by: luelista <weller@rami.io>
25 lines
618 B
Python
25 lines
618 B
Python
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("pretixbase", "0281_event_is_remote"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name="taxrule",
|
|
name="default",
|
|
field=models.BooleanField(default=False),
|
|
),
|
|
migrations.AddConstraint(
|
|
model_name="taxrule",
|
|
constraint=models.UniqueConstraint(
|
|
condition=models.Q(("default", True)),
|
|
fields=("event",),
|
|
name="one_default_per_event",
|
|
),
|
|
),
|
|
]
|