-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
20359 Initial business summary updates #2575
20359 Initial business summary updates #2575
Conversation
business_json["business"]["businessName"] = self._legal_entity.alternate_names[0].name | ||
else: | ||
business_json["business"]["businessName"] = self._legal_entity.business_name | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be better logic here for alternate names.
@@ -303,6 +307,8 @@ def _set_parties(self, legal_entity: dict): | |||
party["mailingAddress"] = BusinessDocument._format_address(party["mailingAddress"]) | |||
if party.get("deliveryAddress"): | |||
party["deliveryAddress"] = BusinessDocument._format_address(party["deliveryAddress"]) | |||
if not party.get("officer", {}).get("partyType") and not party.get("officer", {}).get("lastName"): | |||
party["officer"]["partyType"] = "organization" | |||
legal_entity["parties"] = party_json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handles an odd case when the partner of a firm is an organization, partyType will not be populated. Does not handle when there are 2 partner organizations yet.
Example in FM1000051
My initial changes were getting out of hand to handle this fully, so looking for cleaner suggestions.
if self._legal_entity.alternate_names and self._legal_entity.legal_name == None: | ||
legal_entity["meta_subject"] = "{} ({})".format(self._legal_entity.alternate_names[0].name, self._legal_entity.identifier) | ||
else: | ||
legal_entity["meta_subject"] = "{} ({})".format(self._legal_entity.legal_name, self._legal_entity.identifier) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kept getting an error here when the conditional was met, handles that case but needs improvement.
There's a linting issue Paul. |
811327e
to
1c1f56a
Compare
Quality Gate passedIssues Measures |
Ketaki will be taking over this ticket |
Issue #: /bcgov/entity#20359
Description of changes:
Examples:
FM1000001:
Local:
OCP Dev:
FM1000001.Summary.-.2024-04-06.pdf
FM0292609:
Local:
OCP Dev:
FM1000051:
Local:
OCP Dev:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the lear license (Apache 2.0).