Skip to content

Commit

Permalink
global: remove deprecation warnings
Browse files Browse the repository at this point in the history
* Remove deprecation warning from marshmallow.

Co-authored-by: David Eckhard <[email protected]>
  • Loading branch information
utnapischtim and rekt-hard authored Mar 1, 2022
1 parent 6fa5d2e commit fca4638
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions invenio_oaiserver/verbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ class ListIdentifiers(OAISchema):
"""Arguments for ListIdentifiers verb."""

from_ = DateTime(
format='permissive', load_from='from',
data_key='from', dump_to='from')
format='permissive',
metadata={'load_from': 'from', 'data_key': 'from', 'dump_to': 'from'},
)
until = DateTime(format='permissive')
set = fields.Str()
metadataPrefix = fields.Str(required=True,
Expand Down Expand Up @@ -160,8 +161,8 @@ class ListSets(OAISchema, ResumptionTokenSchema):
def check_extra_params_in_request(verb):
"""Check for extra arguments in incomming request."""
extra = set(request.values.keys()) - set([
getattr(f, 'load_from', None) or getattr(
f, 'data_key', None) or f.name for f in verb.fields.values()
f.metadata.get('load_from', None) or f.metadata
.get('data_key', None) or f.name for f in verb.fields.values()
])
if extra:
raise ValidationError({'_schema': ['You have passed too many arguments.']})
Expand Down

0 comments on commit fca4638

Please sign in to comment.