Skip to content

Commit

Permalink
added sorting to all list endppoints
Browse files Browse the repository at this point in the history
  • Loading branch information
JJFlorian committed Apr 4, 2024
1 parent db7f0e1 commit 1d02960
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class UploadTaskListView(mixins.UserOrganizationMixin, generics.ListAPIView):
"""

serializer_class = serializers.UploadTaskSerializer
queryset = models.UploadTask.objects.all()
queryset = models.UploadTask.objects.all().order_by("-created")

permission_classes = [permissions.IsAuthenticated]

Expand Down
4 changes: 2 additions & 2 deletions gmn/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class GMNListView(mixins.UserOrganizationMixin, generics.ListAPIView):
serializer_class = serializers.GMNSerializer
queryset = gmn_models.GMN.objects.all()
queryset = gmn_models.GMN.objects.all().order_by("-created")

permission_classes = [permissions.IsAuthenticated]

Expand All @@ -27,7 +27,7 @@ class GMNDetailView(mixins.UserOrganizationMixin, generics.RetrieveAPIView):

class MeasuringpointListView(mixins.UserOrganizationMixin, generics.ListAPIView):
serializer_class = serializers.MeasuringpointSerializer
queryset = gmn_models.Measuringpoint.objects.all()
queryset = gmn_models.Measuringpoint.objects.all().order_by("-created")

permission_classes = [permissions.IsAuthenticated]

Expand Down
4 changes: 2 additions & 2 deletions gmw/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class GMWListView(mixins.UserOrganizationMixin, generics.ListAPIView):
serializer_class = serializers.GMWSerializer
queryset = gmw_models.GMW.objects.all()
queryset = gmw_models.GMW.objects.all().order_by("-created")

permission_classes = [permissions.IsAuthenticated]

Expand All @@ -27,7 +27,7 @@ class GMWDetailView(mixins.UserOrganizationMixin, generics.RetrieveAPIView):

class MonitoringTubeListView(mixins.UserOrganizationMixin, generics.ListAPIView):
serializer_class = serializers.MonitoringTubeSerializer
queryset = gmw_models.MonitoringTube.objects.all()
queryset = gmw_models.MonitoringTube.objects.all().order_by("-created")

permission_classes = [permissions.IsAuthenticated]

Expand Down

0 comments on commit 1d02960

Please sign in to comment.