Skip to content

Commit

Permalink
fix for datatime.strptime
Browse files Browse the repository at this point in the history
  • Loading branch information
gtramonte committed Aug 2, 2024
1 parent d7dd851 commit 051320b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/app/oai_dcat/oai_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def convert_to_dcat_ap_it(data, url):
datasets_graph.add((dataset_uri, DCTERMS.description,
Literal(dataset.get("dataset", {}).get("metadata", {}).get("description"))))
datasets_graph.add((dataset_uri, DCTERMS.issued, Literal(
datetime.strptime(dataset.get("dataset", {}).get("metadata", {}).get("publication_date"), '%Y-%m-%d'),
datetime.strptime(str(dataset.get("dataset", {}).get("metadata", {}).get("publication_date")), '%Y-%m-%d'),
datatype=XSD.date)))
datasets_graph.add((dataset_uri, DCTERMS.identifier, Literal(f"XW88C90Q:{dataset_id}")))
# Add dct:modified, dcat:theme, dct:rightsHolder and dct:accrualPeriodicity
Expand Down

0 comments on commit 051320b

Please sign in to comment.