diff --git a/src/data/add_metadata.py b/src/data/add_metadata.py index b910961..d06bc63 100644 --- a/src/data/add_metadata.py +++ b/src/data/add_metadata.py @@ -36,7 +36,8 @@ def base_document_to_gst_document( ] new_metadata_dict["validation_status"] = "validated" new_metadata_dict["version"] = new_metadata_dict.pop("Document Role") - new_metadata_dict["date"] = new_metadata_dict.pop("Date") + # convert date fro dd/mm/yyyy to yyyy-mm-dd + new_metadata_dict["date"] = "-".join(new_metadata_dict.pop("Date").split("/")[::-1]) new_metadata_dict["link"] = new_metadata_dict.get("Documents") new_metadata_dict["document_variant"] = new_metadata_dict.pop("Document Variant") new_metadata_dict["author_is_party"] = new_metadata_dict["Author Type"] == "Party"