Skip to content

Commit

Permalink
indexer fix - convert date to specific format for GSTDocumentMetadata…
Browse files Browse the repository at this point in the history
… parsing
  • Loading branch information
kdutia committed Dec 19, 2023
1 parent 727e224 commit e5dc37d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/data/add_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit e5dc37d

Please sign in to comment.