mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Allow to hide a product unless a specific quota is sold out (#1351)
* Allow to hide a product unless a specific quota is sold out * Fix required property * Add API property and copy between events
This commit is contained in:
@@ -254,6 +254,11 @@ class AddOnsForm(forms.Form):
|
||||
self.vars_cache = {}
|
||||
|
||||
for i in items:
|
||||
if i.hidden_if_available:
|
||||
q = i.hidden_if_available.availability(_cache=quota_cache)
|
||||
if q[0] == Quota.AVAILABILITY_OK:
|
||||
continue
|
||||
|
||||
if i.has_variations:
|
||||
choices = [('', _('no selection'), '')]
|
||||
for v in i.available_variations:
|
||||
|
||||
Reference in New Issue
Block a user