Skip to content

Commit

Permalink
sort scenarios by ref id (#1195)
Browse files Browse the repository at this point in the history
  • Loading branch information
ab-smith authored Dec 16, 2024
2 parents e9a5f4e + 1f0401d commit 1915255
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1268,6 +1268,8 @@ class RiskScenarioViewSet(BaseModelViewSet):
"assets",
"applied_controls",
]
ordering = ["ref_id"]
ordering_fields = ordering

def _perform_write(self, serializer):
if not serializer.validated_data.get("ref_id"):
Expand Down

0 comments on commit 1915255

Please sign in to comment.