Fixed bug in quota calculation (thanks @rixx!)

This commit is contained in:
Raphael Michel
2016-08-04 18:00:28 +02:00
parent 17d5221579
commit 58e706b721
2 changed files with 17 additions and 0 deletions

View File

@@ -527,6 +527,7 @@ class Quota(LoggedModel):
return Voucher.objects.filter(
Q(block_quota=True) &
Q(redeemed=False) &
Q(Q(valid_until__isnull=True) | Q(valid_until__gte=now())) &
Q(Q(self._position_lookup) | Q(quota=self))
).distinct().count()