Commit 1308cfb7 authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB
Browse files

Add ordering to list views

Add ordering for nested views for a superevent: events, voevents,
and EMObservations.
parent 74c7de89
......@@ -117,6 +117,7 @@ class SupereventEventViewSet(SafeDestroyMixin,
lookup_url_kwarg = 'graceid'
destroy_error_classes = (Superevent.PreferredEventRemovalError,)
destroy_error_response_status = status.HTTP_400_BAD_REQUEST
list_view_order_by = ('pk',)
# TODO: do we need to filter events by user?
def get_object(self):
......@@ -287,6 +288,7 @@ class SupereventVOEventViewSet(SafeCreateMixin,
create_error_classes = (VOEventBuilderException)
lookup_url_kwarg = 'N'
lookup_field = 'N'
list_view_order_by = ('N',)
class SupereventEMObservationViewSet(SafeCreateMixin,
......@@ -300,6 +302,7 @@ class SupereventEMObservationViewSet(SafeCreateMixin,
ParentSupereventAnnotatePermissions,)
lookup_url_kwarg = 'N'
lookup_field = 'N'
list_view_order_by = ('N',)
class SupereventSignoffViewSet(SafeCreateMixin,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment