From a14e356b4c2c837426a5e16e91e5dfd5a40ae5e8 Mon Sep 17 00:00:00 2001 From: "Ed (ODSC)" Date: Wed, 23 Oct 2024 15:19:48 +0100 Subject: [PATCH] checks.py: Serialise all dates --- libcovebods/tasks/checks.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libcovebods/tasks/checks.py b/libcovebods/tasks/checks.py index a8b0f6d..9770160 100644 --- a/libcovebods/tasks/checks.py +++ b/libcovebods/tasks/checks.py @@ -824,7 +824,7 @@ def check_statement_first_pass(self, statement): { "type": "statement_source_retrieved_at_future_date", "statement_type": None, - "retrieval_date": retrieved_at, + "retrieval_date": str(retrieved_at), "statement": statement.get("statementId"), } ) @@ -846,7 +846,7 @@ def check_statement_first_pass(self, statement): { "type": "statement_date_is_future_date", "statement_type": None, - "statement_date": statement_date, + "statement_date": str(statement_date), "statement": statement.get("statementId"), } ) @@ -987,8 +987,8 @@ def check_entity_statement_first_pass(self, statement): { "type": "statement_entity_dissolution_before_founding_date", "statement_type": None, - "founding_date": founding_date, - "dissolution_date": dissolution_date, + "founding_date": str(founding_date), + "dissolution_date": str(dissolution_date), "statement": statement.get("statementId"), } ) @@ -1016,7 +1016,7 @@ def check_person_statement_first_pass(self, statement): { "type": "statement_person_birth_date_in_future", "statement_type": None, - "birth_date": birth_date, + "birth_date": str(birth_date), "statement": statement.get("statementId"), } ) @@ -1025,7 +1025,7 @@ def check_person_statement_first_pass(self, statement): { "type": "statement_person_birth_date_too_far_in_past", "statement_type": None, - "birth_date": birth_date, + "birth_date": str(birth_date), "statement": statement.get("statementId"), } ) @@ -1061,8 +1061,8 @@ def check_ownership_or_control_statement_first_pass(self, statement): { "type": "statement_relationship_interests_start_after_end_date", "statement_type": None, - "start_date": start_date, - "end_start": end_date, + "start_date": str(start_date), + "end_start": str(end_date), "statement": statement.get("statementId"), } )