Fix raid events mis-ordered due to not calling superclass's get_queryset() method.
This commit is contained in:
parent
3f8ed2c4ce
commit
f6c4c732d6
|
@ -19,6 +19,7 @@ User = get_user_model()
|
|||
|
||||
|
||||
class RaidCalendar(MonthArchiveView):
|
||||
queryset = Raid.objects.all()
|
||||
allow_empty = True
|
||||
allow_future = True
|
||||
date_field = "date"
|
||||
|
@ -27,11 +28,12 @@ class RaidCalendar(MonthArchiveView):
|
|||
template_name_suffix = "_calendar"
|
||||
|
||||
def get_queryset(self):
|
||||
if not self.request.user.is_authenticated:
|
||||
return Raid.objects.all()
|
||||
return Raid.objects.annotate(
|
||||
queryset = super().get_queryset()
|
||||
if self.request.user.is_authenticated:
|
||||
queryset = queryset.annotate(
|
||||
max_status=Max("responses__status", filter=Q(responses__character__user=self.request.user))
|
||||
)
|
||||
return queryset
|
||||
|
||||
def get_dated_queryset(self, **lookup):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue