Variations on pretixpresale's initial ticket layout

This commit is contained in:
Raphael Michel
2015-02-11 18:32:43 +01:00
parent 68ff568d47
commit 270a359e2e
7 changed files with 85 additions and 15 deletions

View File

@@ -181,7 +181,7 @@ In our example, the implementation could look like this::
# Only take this restriction into consideration if it
# is directly applied to this variation or if the item
# has no variations
if len(v) != 0 and ('variation' not in v or v['variation'] not in applied_to):
if not v.empty() and ('variation' not in v or v['variation'] not in applied_to):
continue
if restriction.timeframe_from <= now() <= restriction.timeframe_to: