mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Discounts: Add applicability date ranges (Z#23151897) (#4927)
* Add event date fields, add preliminary range check * Remove function, use filtered queryset for subevent id limit * Improve and fix date range check * Add formfields * Add tests * Improve tests * Add new fields to API and documentation * Add migration * Change description according to suggestion * Change discount apply signature, remove unnecessary query * Rename new fields, simplify range check * Rename fields in template * Apply suggestions from code review Co-authored-by: Raphael Michel <michel@rami.io> --------- Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
@@ -47,6 +47,8 @@ TEST_DISCOUNT_RES = {
|
||||
"available_from": None,
|
||||
"available_until": None,
|
||||
"subevent_mode": "mixed",
|
||||
"subevent_date_from": None,
|
||||
"subevent_date_until": None,
|
||||
"condition_all_products": True,
|
||||
"condition_limit_products": [],
|
||||
"condition_apply_to_addons": True,
|
||||
|
||||
Reference in New Issue
Block a user