From a59dc6c93d1d49d63941a9c7cf48d2d0dfe68578 Mon Sep 17 00:00:00 2001 From: Doug Lovett Date: Mon, 8 Jul 2024 13:21:13 -0700 Subject: [PATCH] TC NA group type report updates, legacy LTSA pid description. (#1969) Signed-off-by: Doug Lovett --- .../report-templates/template-parts/registration/owners.html | 4 ++-- .../report-templates/template-parts/search-result/owners.html | 2 +- mhr_api/src/mhr_api/models/db2/location.py | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mhr_api/report-templates/template-parts/registration/owners.html b/mhr_api/report-templates/template-parts/registration/owners.html index 21a5a99ab..91ff6ce8a 100644 --- a/mhr_api/report-templates/template-parts/registration/owners.html +++ b/mhr_api/report-templates/template-parts/registration/owners.html @@ -51,7 +51,7 @@ Group Tenancy Type:  - {% if group.owners|length > 1 %}Joint Tenancy{% else %}N/A{% endif %} + {% if group.owners|length > 1 and group.type != 'NA' %}Joint Tenancy{% else %}N/A{% endif %} @@ -121,7 +121,7 @@ Group Tenancy Type:  - {% if group.owners|length > 1 %}Joint Tenancy{% else %}N/A{% endif %} + {% if group.owners|length > 1 and group.type != 'NA' %}Joint Tenancy{% else %}N/A{% endif %} diff --git a/mhr_api/report-templates/template-parts/search-result/owners.html b/mhr_api/report-templates/template-parts/search-result/owners.html index f51b4393b..20e54847c 100755 --- a/mhr_api/report-templates/template-parts/search-result/owners.html +++ b/mhr_api/report-templates/template-parts/search-result/owners.html @@ -34,7 +34,7 @@ Group Tenancy Type:  - {% if group.owners|length > 1 %}Joint Tenancy{% else %}N/A{% endif %} + {% if group.owners|length > 1 and group.type != 'NA' %}Joint Tenancy{% else %}N/A{% endif %} diff --git a/mhr_api/src/mhr_api/models/db2/location.py b/mhr_api/src/mhr_api/models/db2/location.py index f87a4f8cb..97c569136 100755 --- a/mhr_api/src/mhr_api/models/db2/location.py +++ b/mhr_api/src/mhr_api/models/db2/location.py @@ -308,6 +308,8 @@ def new_registration_json(self): tax_date = model_utils.format_local_date(self.tax_certificate_date) if tax_date: location['taxExpiryDate'] = tax_date + if self.ltsa: + location['legalDescription'] = self.ltsa.ltsa_description return self.derive_location_type(location) def derive_location_type(self, location: dict) -> dict: