Skip to content

Commit

Permalink
fix: serialization of from parameter
Browse files Browse the repository at this point in the history
fixes serialization of from parameter
  • Loading branch information
floriangantner committed Nov 18, 2024
1 parent 3cf2983 commit 651b495
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion invenio_oaiserver/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def envelope(**kwargs):
e_responseDate.text = datetime_to_datestamp(datetime.utcnow())
e_request = SubElement(e_oaipmh, etree.QName(NS_OAIPMH, "request"))
for key, value in kwargs.items():
if key == "from_" or key == "until":
if key == "from" or key == "until":
value = datetime_to_datestamp(value)
elif key == "resumptionToken":
value = value["token"]
Expand Down
3 changes: 2 additions & 1 deletion invenio_oaiserver/verbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ class ListIdentifiers(OAISchema):

from_ = DateTime(
format="permissive",
metadata={"load_from": "from", "data_key": "from", "dump_to": "from"},
metadata={"data_key": "from"},
data_key="from",
attribute="from",
)
until = DateTime(format="permissive")
set = fields.Str()
Expand Down

0 comments on commit 651b495

Please sign in to comment.