mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Revert "Do not allow to cancel gift card positions"
This reverts commit 951e99d0da.
This commit is contained in:
@@ -1167,7 +1167,6 @@ class OrderChangeManager:
|
||||
'seat_required': _('The selected product requires you to select a seat.'),
|
||||
'seat_forbidden': _('The selected product does not allow to select a seat.'),
|
||||
'gift_card_change': _('You cannot change the price of a position that has been used to issue a gift card.'),
|
||||
'gift_card_cancel': _('You cannot cancel a position that has been used to issue a gift card.'),
|
||||
}
|
||||
ItemOperation = namedtuple('ItemOperation', ('position', 'item', 'variation'))
|
||||
SubeventOperation = namedtuple('SubeventOperation', ('position', 'subevent'))
|
||||
@@ -1343,9 +1342,6 @@ class OrderChangeManager:
|
||||
self._operations.append(self.FeeValueOperation(fee, value))
|
||||
|
||||
def cancel(self, position: OrderPosition):
|
||||
if position.issued_gift_cards.exists():
|
||||
raise OrderError(self.error_messages['gift_card_cancel'])
|
||||
|
||||
self._totaldiff -= position.price
|
||||
self._quotadiff.subtract(position.quotas)
|
||||
self._operations.append(self.CancelOperation(position))
|
||||
|
||||
Reference in New Issue
Block a user