Fix an unlogical comparison in a query

This commit is contained in:
Raphael Michel
2019-05-15 15:23:02 +02:00
parent 5b99bf3623
commit 0311c0251a

View File

@@ -634,7 +634,7 @@ class CartManager:
Q(voucher=voucher) & Q(event=self.event) &
Q(expires__gte=self.now_dt)
).exclude(pk__in=[
op.position.voucher_id for op in self._operations if isinstance(op, self.ExtendOperation)
op.position.id for op in self._operations if isinstance(op, self.ExtendOperation)
])
cart_count = redeemed_in_carts.count()
v_avail = voucher.max_usages - voucher.redeemed - cart_count