From b71ff0022a11abe91d7160e94c4b4b7e975f6976 Mon Sep 17 00:00:00 2001 From: Hongjing Chen Date: Tue, 3 Dec 2024 00:20:01 +0000 Subject: [PATCH 1/2] 24481 - versioned business issue for loading placeholder state filing Signed-off-by: Hongjing Chen --- legal-api/src/legal_api/services/business_details_version.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/legal-api/src/legal_api/services/business_details_version.py b/legal-api/src/legal_api/services/business_details_version.py index fb3f60bdb5..996db73c67 100644 --- a/legal-api/src/legal_api/services/business_details_version.py +++ b/legal-api/src/legal_api/services/business_details_version.py @@ -594,6 +594,8 @@ def resolution_json(resolution_revision) -> dict: @staticmethod def business_revision_json(business_revision, business_json): """Return the business revision as a json object.""" + if not business_revision: + return business_json business_json['hasRestrictions'] = business_revision.restriction_ind business_json['dissolutionDate'] = LegislationDatetime.format_as_legislation_date( business_revision.dissolution_date) if business_revision.dissolution_date else None From 43ef8dc007fe45fd27c3e902b112ec525ebc4e4c Mon Sep 17 00:00:00 2001 From: Hongjing Chen Date: Tue, 3 Dec 2024 21:33:37 +0000 Subject: [PATCH 2/2] add comment for tombstone business revision issue Signed-off-by: Hongjing Chen --- legal-api/src/legal_api/services/business_details_version.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/legal-api/src/legal_api/services/business_details_version.py b/legal-api/src/legal_api/services/business_details_version.py index 996db73c67..bd0693af62 100644 --- a/legal-api/src/legal_api/services/business_details_version.py +++ b/legal-api/src/legal_api/services/business_details_version.py @@ -594,6 +594,8 @@ def resolution_json(resolution_revision) -> dict: @staticmethod def business_revision_json(business_revision, business_json): """Return the business revision as a json object.""" + # business_revision for tombstone business will be None + # check and skip to return original business_json if not business_revision: return business_json business_json['hasRestrictions'] = business_revision.restriction_ind