Skip to content

Commit

Permalink
Pinned situation report documents first
Browse files Browse the repository at this point in the history
  • Loading branch information
szabozoltan69 committed Jan 31, 2025
1 parent 21b2899 commit 5b8a451
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/drf_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,11 +778,12 @@ class SituationReportTypeViewset(viewsets.ReadOnlyModelViewSet):


class SituationReportViewset(ReadOnlyVisibilityViewsetMixin, viewsets.ReadOnlyModelViewSet):
queryset = SituationReport.objects.select_related("type").order_by("-created_at")
queryset = SituationReport.objects.select_related("type").order_by("-is_pinned,-created_at")
authentication_classes = (TokenAuthentication,)
serializer_class = SituationReportSerializer
ordering_fields = (
"created_at",
"is_pinned",
"name",
)
filterset_class = SituationReportFilter
Expand Down

0 comments on commit 5b8a451

Please sign in to comment.