Make ItemBundle.designated_price non-nullable

This commit is contained in:
Raphael Michel
2019-03-23 23:42:58 +01:00
parent e6859fa82b
commit a6de586b80
2 changed files with 25 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
# Generated by Django 2.1.7 on 2019-03-23 22:38
from decimal import Decimal
import django.db.models.deletion
import jsonfallback.fields
from django.db import migrations, models
import pretix.base.models.fields
class Migration(migrations.Migration):
dependencies = [
('pretixbase', '0114_auto_20190316_1014'),
]
operations = [
migrations.AlterField(
model_name='itembundle',
name='designated_price',
field=models.DecimalField(blank=True, decimal_places=2, default=Decimal('0.00'), help_text="If set, it will be shown that this bundled item is responsible for the given value of the total gross price. This might be important in cases of mixed taxation, but can be kept blank otherwise. This value will NOT be added to the base item's price.", max_digits=10, verbose_name='Designated price part'),
),
]

View File

@@ -818,7 +818,7 @@ class ItemBundle(models.Model):
verbose_name=_('Number')
)
designated_price = models.DecimalField(
null=True, blank=True,
default=Decimal('0.00'), blank=True,
decimal_places=2, max_digits=10,
verbose_name=_('Designated price part'),
help_text=_('If set, it will be shown that this bundled item is responsible for the given value of the total '