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
0f04d57f
Commit
0f04d57f
authored
6 years ago
by
Tanner Prestegard
Committed by
GraceDB
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix to event graceid fields error handling in API
parent
36259706
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#51460
passed
6 years ago
Stage: branch
Stage: latest
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gracedb/api/v1/fields.py
+2
-2
2 additions, 2 deletions
gracedb/api/v1/fields.py
with
2 additions
and
2 deletions
gracedb/api/v1/fields.py
+
2
−
2
View file @
0f04d57f
...
...
@@ -4,7 +4,7 @@ import logging
from
django.utils
import
six
from
rest_framework
import
fields
from
rest_framework
import
exceptions
,
fields
# Set up logger
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -124,7 +124,7 @@ class GenericField(fields.Field):
error_msg
=
'
{model} with {lf}={data} does not exist
'
\
.
format
(
model
=
self
.
model
.
__name__
,
lf
=
model_dict
.
keys
()[
0
],
data
=
model_dict
.
values
()[
0
])
raise
serializer
s
.
ValidationError
(
error_msg
)
raise
exception
s
.
ValidationError
(
error_msg
)
def
get_model_dict
(
self
,
data
):
return
{
self
.
lookup_field
:
data
}
...
...
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