add tiered availability by time (Z#23204747) (#5737)

* add tiered availability by time

* replace bitwise operator

* rephrase help text
This commit is contained in:
Lukas Bockstaller
2026-01-20 10:32:17 +01:00
committed by GitHub
parent a900e11ce0
commit ed618f2f32
3 changed files with 50 additions and 5 deletions

View File

@@ -311,7 +311,8 @@ def get_grouped_items(event, *, channel: SalesChannel, subevent=None, voucher=No
)
else:
q = item.hidden_if_item_available.check_quotas(subevent=subevent, _cache=quota_cache, include_bundled=True)
item._dependency_available = q[0] == Quota.AVAILABILITY_OK
time_available = item.hidden_if_item_available.is_available()
item._dependency_available = (q[0] == Quota.AVAILABILITY_OK) and time_available
if item._dependency_available and item.hidden_if_item_available_mode == Item.UNAVAIL_MODE_HIDDEN:
item._remove = True
continue