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

@@ -376,6 +376,7 @@ class MembershipStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
memberships = list(self.cart_customer.memberships.with_usages().filter(
Q(Q(membership_type__max_usages__isnull=True) | Q(usages__lt=F('membership_type__max_usages'))),
canceled=False
).select_related('membership_type'))
for p in self.applicable_positions: