Deal with cancelling memberships (#2130)

This commit is contained in:
Raphael Michel
2021-06-17 18:10:45 +02:00
committed by GitHub
parent 8ad53256c2
commit 1ef076bb9b
13 changed files with 153 additions and 2 deletions

View File

@@ -141,6 +141,11 @@ def validate_memberships_in_order(customer: Customer, positions: List[AbstractPo
_('You selected a membership that is connected to a different customer account.')
)
if m.canceled:
raise ValidationError(
_('You selected membership that has been canceled.')
)
if m.testmode != testmode:
raise ValidationError(
_('You can only use a test mode membership for test mode tickets.')