Fix ordering on pseudo-responses.

This commit is contained in:
Casper V. Kristensen 2020-01-03 01:53:15 +01:00
parent ae56229afe
commit be86354c1f
Signed by: caspervk
GPG key ID: 289CA03790535054

View file

@ -141,7 +141,7 @@ class RaidDetailView(SingleObjectMixin, MultiModelFormView):
no_response_users = User.objects \
.exclude(Q(date_joined__gt=raid.date) | Q(characters__raid_responses__raid=raid) | Q(is_active=False)) \
.select_related("main") \
.order_by("main__klass")
.order_by("main__klass", "rank", "main__name")
pseudo_no_responses = [RaidResponse(character=user.main, status=None)
for user in no_response_users]
prefetch_related_objects(pseudo_no_responses, "character__user__rank", "character__user__main")