Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IGWN Computing and Software
GraceDB
GraceDB Server
Commits
59f1fafd
Commit
59f1fafd
authored
6 years ago
by
Tanner Prestegard
Committed by
GraceDB
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Handling errors for VOEvent building in view
parent
414054ff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!8
Superevents
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gracedb/superevents/api/views.py
+4
-2
4 additions, 2 deletions
gracedb/superevents/api/views.py
with
4 additions
and
2 deletions
gracedb/superevents/api/views.py
+
4
−
2
View file @
59f1fafd
...
@@ -25,6 +25,7 @@ from events.view_utils import reverse as gracedb_reverse
...
@@ -25,6 +25,7 @@ from events.view_utils import reverse as gracedb_reverse
#from events.api.views import IsAuthorizedForPipeline, LigoLwRenderer
#from events.api.views import IsAuthorizedForPipeline, LigoLwRenderer
from
events.api.backends
import
LigoAuthentication
from
events.api.backends
import
LigoAuthentication
from
..buildVOEvent
import
VOEventBuilderException
from
.filters
import
SupereventSearchFilter
,
SupereventOrderingFilter
from
.filters
import
SupereventSearchFilter
,
SupereventOrderingFilter
from
.mixins
import
GetParentSupereventMixin
,
BaseGetObjectMixin
,
\
from
.mixins
import
GetParentSupereventMixin
,
BaseGetObjectMixin
,
\
SafeDestroyMixin
,
SafeCreateMixin
SafeDestroyMixin
,
SafeCreateMixin
...
@@ -173,9 +174,9 @@ class SupereventLogViewSet(mixins.ListModelMixin,
...
@@ -173,9 +174,9 @@ class SupereventLogViewSet(mixins.ListModelMixin,
pagination_class
=
BasePaginationFactory
(
results_name
=
'
log
'
)
pagination_class
=
BasePaginationFactory
(
results_name
=
'
log
'
)
lookup_field
=
'
N
'
lookup_field
=
'
N
'
# TODO: filter logs for viewers
def
get_queryset
(
self
):
def
get_queryset
(
self
):
superevent
=
self
.
get_parent
()
superevent
=
self
.
get_parent
()
logger
.
warning
(
'
may need to filter logs for users
'
)
queryset
=
superevent
.
log_set
.
all
().
order_by
(
'
N
'
)
queryset
=
superevent
.
log_set
.
all
().
order_by
(
'
N
'
)
# filter for those tagged with external access tagname if is_external(request.user)
# filter for those tagged with external access tagname if is_external(request.user)
return
queryset
return
queryset
...
@@ -234,7 +235,7 @@ class SupereventFileViewSet(GetParentSupereventMixin,
...
@@ -234,7 +235,7 @@ class SupereventFileViewSet(GetParentSupereventMixin,
class
SupereventVOEventViewSet
(
mixins
.
ListModelMixin
,
class
SupereventVOEventViewSet
(
mixins
.
ListModelMixin
,
mixins
.
RetrieveModelMixin
,
mixins
.
RetrieveModelMixin
,
mixins
.
CreateM
odelM
ixin
,
Safe
CreateMixin
,
GetParentSupereventMixin
,
GetParentSupereventMixin
,
BaseGetObjectMixin
,
BaseGetObjectMixin
,
viewsets
.
GenericViewSet
):
viewsets
.
GenericViewSet
):
...
@@ -244,6 +245,7 @@ class SupereventVOEventViewSet(mixins.ListModelMixin,
...
@@ -244,6 +245,7 @@ class SupereventVOEventViewSet(mixins.ListModelMixin,
serializer_class
=
SupereventVOEventSerializer
serializer_class
=
SupereventVOEventSerializer
pagination_class
=
BasePaginationFactory
(
results_name
=
'
voevents
'
)
pagination_class
=
BasePaginationFactory
(
results_name
=
'
voevents
'
)
lookup_field
=
'
N
'
lookup_field
=
'
N
'
create_error_classes
=
(
VOEventBuilderException
)
def
get_queryset
(
self
):
def
get_queryset
(
self
):
superevent
=
self
.
get_parent
()
superevent
=
self
.
get_parent
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment