Revert "Do not allow to cancel gift card positions"

This reverts commit 951e99d0da.
This commit is contained in:
Raphael Michel
2020-09-28 12:13:04 +02:00
parent 4555a917b2
commit 9490f20a6c

View File

@@ -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))