Skip to content

Commit

Permalink
Merge pull request #758 from Health-Informatics-UoN/feat/754/fix-bug
Browse files Browse the repository at this point in the history
Fix bug of refreshing making disordering records
  • Loading branch information
AndrewThien authored Jun 12, 2024
2 parents 9fc376f + 5a35acf commit 3aa4d93
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/api/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,7 @@ class ScanReportFieldViewSetV2(ScanReportFieldViewSet):
filter_backends = [DjangoFilterBackend, OrderingFilter]
ordering_fields = ["name", "description_column", "type_column"]
pagination_class = CustomPagination
ordering = "name"

def get_serializer_class(self):
if self.request.method in ["GET", "POST"]:
Expand Down Expand Up @@ -1096,6 +1097,7 @@ class ScanReportValueViewSet(viewsets.ModelViewSet):
"value": ["in", "exact"],
"id": ["in", "exact"],
}
ordering = "id"

def get_permissions(self):
if self.request.method == "DELETE":
Expand Down

0 comments on commit 3aa4d93

Please sign in to comment.