Allow to create a new gift card when refunding

This commit is contained in:
Raphael Michel
2019-11-28 10:13:39 +01:00
parent 46d4d97c13
commit 5462e256ac
5 changed files with 105 additions and 5 deletions

View File

@@ -932,7 +932,7 @@ class GiftCardListView(OrganizerDetailViewMixin, OrganizerPermissionRequiredMixi
def get_queryset(self):
qs = self.request.organizer.issued_gift_cards.annotate(
cached_value=Sum('transactions__value')
cached_value=Coalesce(Sum('transactions__value'), Decimal('0.00'))
)
if self.filter_form.is_valid():
qs = self.filter_form.filter_qs(qs)