Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
webservices
cern-search
cern-search-rest-api
Commits
d695e7ed
Commit
d695e7ed
authored
Jul 09, 2019
by
Pablo Panero
Browse files
serializer: rename record validation function
parent
21d77919
Changes
1
Hide whitespace changes
Inline
Side-by-side
cern_search_rest_api/modules/cernsearch/marshmallow/json.py
View file @
d695e7ed
...
...
@@ -25,7 +25,7 @@ def has_and_needs_binary(original_data):
class
CSASRecordSchemaV1
(
RecordMetadataSchemaJSONV1
):
@
validates_schema
(
pass_original
=
True
)
def
add_unknown_fields
(
self
,
data
,
original_data
):
def
validate_record
(
self
,
data
,
original_data
):
if
not
original_data
.
get
(
'_access'
):
raise
ValidationError
(
'Missing field _access'
)
delete
=
original_data
.
get
(
'_access'
).
get
(
'delete'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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