mirror of
https://github.com/pretix/pretix.git
synced 2026-08-07 10:17:49 +00:00
* Fix #65 -- Disallow None value for product default prices * Fix #65 -- Disallow None value for product default prices * Rebase migration
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 4.2.9 on 2024-01-30 11:11
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("pretixbase", "0256_itemvariation_unavail_modes"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="item",
|
||||
name="default_price",
|
||||
field=models.DecimalField(decimal_places=2, default=0, max_digits=13),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
||||
@@ -430,7 +430,7 @@ class Item(LoggedModel):
|
||||
help_text=_("If this product has multiple variations, you can set different prices for each of the "
|
||||
"variations. If a variation does not have a special price or if you do not have variations, "
|
||||
"this price will be used."),
|
||||
max_digits=13, decimal_places=2, null=True
|
||||
max_digits=13, decimal_places=2,
|
||||
)
|
||||
free_price = models.BooleanField(
|
||||
default=False,
|
||||
|
||||
@@ -934,7 +934,7 @@ def test_cartpos_create_with_voucher_unknown(token_client, organizer, event, ite
|
||||
@pytest.mark.django_db
|
||||
def test_cartpos_create_with_voucher_invalid_item(token_client, organizer, event, item, quota):
|
||||
with scopes_disabled():
|
||||
item2 = event.items.create(name="item2")
|
||||
item2 = event.items.create(name="item2", default_price=0)
|
||||
voucher = event.vouchers.create(code="FOOBAR", item=item2)
|
||||
res = copy.deepcopy(CARTPOS_CREATE_PAYLOAD)
|
||||
res['item'] = item.pk
|
||||
|
||||
Reference in New Issue
Block a user