Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jonah Kanner
gracedb
Commits
1308cfb7
Commit
1308cfb7
authored
Oct 01, 2018
by
Tanner Prestegard
Committed by
GraceDB
Oct 01, 2018
Browse files
Add ordering to list views
Add ordering for nested views for a superevent: events, voevents, and EMObservations.
parent
74c7de89
Changes
1
Hide whitespace changes
Inline
Side-by-side
gracedb/api/v1/superevents/views.py
View file @
1308cfb7
...
...
@@ -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
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment