mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Voucher form: Fix quota check for partially redeemed vouchers
This commit is contained in:
@@ -201,6 +201,8 @@ class VoucherForm(I18nModelForm):
|
||||
cnt = len(data['codes']) * data.get('max_usages', 0)
|
||||
else:
|
||||
cnt = data.get('max_usages', 0)
|
||||
if self.instance and self.instance.pk:
|
||||
cnt -= self.instance.redeemed # these do not need quota any more
|
||||
|
||||
Voucher.clean_item_properties(
|
||||
data, self.instance.event,
|
||||
|
||||
Reference in New Issue
Block a user