forked from CGM_Public/pretix_original
Remove subevent.items (#4220)
This commit is contained in:
@@ -1468,8 +1468,6 @@ class SubEvent(EventMixin, LoggedModel):
|
||||
seating_plan = models.ForeignKey('SeatingPlan', on_delete=models.PROTECT, null=True, blank=True,
|
||||
related_name='subevents', verbose_name=_('Seating plan'))
|
||||
|
||||
items = models.ManyToManyField('Item', through='SubEventItem')
|
||||
variations = models.ManyToManyField('ItemVariation', through='SubEventItemVariation')
|
||||
comment = models.TextField(
|
||||
verbose_name=_("Internal comment"),
|
||||
null=True, blank=True
|
||||
|
||||
@@ -28,7 +28,7 @@ from django_countries.fields import Country
|
||||
from django_scopes import scopes_disabled
|
||||
|
||||
from pretix.base.models import (
|
||||
InvoiceAddress, Order, OrderPosition, SeatingPlan, SubEvent,
|
||||
InvoiceAddress, ItemVariation, Order, OrderPosition, SeatingPlan, SubEvent,
|
||||
)
|
||||
from pretix.base.models.orders import OrderFee
|
||||
|
||||
@@ -503,7 +503,7 @@ def test_subevent_update(token_client, organizer, event, subevent, item, item2,
|
||||
)
|
||||
assert resp.status_code == 200
|
||||
with scopes_disabled():
|
||||
assert subevent.items.get(id=item.pk).default_price == Decimal('23.00')
|
||||
assert event.items.get(id=item.pk).default_price == Decimal('23.00')
|
||||
assert subevent.item_price_overrides[item.pk] == Decimal('99.99')
|
||||
|
||||
resp = token_client.patch(
|
||||
@@ -609,7 +609,7 @@ def test_subevent_update(token_client, organizer, event, subevent, item, item2,
|
||||
)
|
||||
assert resp.status_code == 200
|
||||
with scopes_disabled():
|
||||
assert subevent.variations.get(id=variations[0].pk).default_price == Decimal('12.00')
|
||||
assert ItemVariation.objects.get(id=variations[0].pk).default_price == Decimal('12.00')
|
||||
assert subevent.var_price_overrides[variations[0].pk] == Decimal('99.99')
|
||||
|
||||
resp = token_client.patch(
|
||||
|
||||
Reference in New Issue
Block a user