mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
order_overview: allow filtering by time (#4958)
This commit is contained in:
@@ -134,13 +134,13 @@ def order_overview(
|
|||||||
qs = qs.filter(item__admission=True)
|
qs = qs.filter(item__admission=True)
|
||||||
items = items.filter(admission=True)
|
items = items.filter(admission=True)
|
||||||
|
|
||||||
if date_from and isinstance(date_from, date):
|
if date_from and isinstance(date_from, date) and not isinstance(date_from, datetime):
|
||||||
date_from = make_aware(datetime.combine(
|
date_from = make_aware(datetime.combine(
|
||||||
date_from,
|
date_from,
|
||||||
time(hour=0, minute=0, second=0, microsecond=0)
|
time(hour=0, minute=0, second=0, microsecond=0)
|
||||||
), event.timezone)
|
), event.timezone)
|
||||||
|
|
||||||
if date_until and isinstance(date_until, date):
|
if date_until and isinstance(date_until, date) and not isinstance(date_until, datetime):
|
||||||
date_until = make_aware(datetime.combine(
|
date_until = make_aware(datetime.combine(
|
||||||
date_until + timedelta(days=1),
|
date_until + timedelta(days=1),
|
||||||
time(hour=0, minute=0, second=0, microsecond=0)
|
time(hour=0, minute=0, second=0, microsecond=0)
|
||||||
|
|||||||
Reference in New Issue
Block a user