mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Backend event list: Sort event series by their actual dates, like in the frontend (Z#23187301) (#4993)
This commit is contained in:
@@ -206,9 +206,9 @@ class OrganizerDetail(OrganizerDetailViewMixin, OrganizerPermissionRequiredMixin
|
||||
max_to=Max('subevents__date_to'),
|
||||
max_fromto=Greatest(Max('subevents__date_to'), Max('subevents__date_from'))
|
||||
).annotate(
|
||||
order_from=Coalesce('min_from', 'date_from'),
|
||||
order_from=Coalesce('max_from', 'date_from'),
|
||||
order_to=Coalesce('max_fromto', 'max_to', 'max_from', 'date_to', 'date_from'),
|
||||
)
|
||||
).order_by("-order_from")
|
||||
if self.filter_form.is_valid():
|
||||
qs = self.filter_form.filter_qs(qs)
|
||||
return qs
|
||||
|
||||
Reference in New Issue
Block a user