diff --git a/invenio_oaiserver/verbs.py b/invenio_oaiserver/verbs.py index 563a36b..7461536 100644 --- a/invenio_oaiserver/verbs.py +++ b/invenio_oaiserver/verbs.py @@ -91,8 +91,8 @@ def validate(self, data, **kwargs): data['from_'] > data['until']: raise ValidationError('Date "from" must be before "until".') extra = set(request.values.keys()) - set([ - getattr(f, 'load_from', None) or getattr( - f, 'data_key', None) or f.name for f in self.fields.values() + f.metadata.get('load_from', None) or f.metadata + .get('data_key', None) or f.name for f in self.fields.values() ]) if extra: raise ValidationError('You have passed too many arguments.')