Add member sorting by recently inactive

This commit is contained in:
2021-07-24 21:47:58 +00:00
parent 403b0be895
commit 349b5941fb
3 changed files with 8 additions and 2 deletions

View File

@@ -103,6 +103,9 @@ class SearchViewSet(Base, Retrieve):
elif self.action == 'create' and sort == 'oldest_overall':
queryset = queryset.filter(application_date__isnull=False)
queryset = queryset.order_by('application_date')
elif self.action == 'create' and sort == 'recently_inactive':
queryset = queryset.filter(paused_date__isnull=False)
queryset = queryset.order_by('-paused_date')
elif self.action == 'create' and sort == 'best_looking':
queryset = []