-
Notifications
You must be signed in to change notification settings - Fork 71
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
18502 Filer conversion filing updates #2377
18502 Filer conversion filing updates #2377
Conversation
with suppress(IndexError, KeyError, TypeError): | ||
name_request_json = dpath.util.get( |
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.
already covered in each function for sp and gp (nameRequest and naics)
startDate has to be handled separately in each function |
Can you try to call existing function instead of copying it here? |
queue_services/entity-filer/src/entity_filer/filing_processors/conversion.py
Outdated
Show resolved
Hide resolved
As Vysakh mentioned, there is a lot of duplication in this code. Can we update And can we just import |
queue_services/entity-filer/src/entity_filer/filing_processors/filing_components/partner.py
Outdated
Show resolved
Hide resolved
queue_services/entity-filer/src/entity_filer/filing_processors/change_of_registration.py
Outdated
Show resolved
Hide resolved
...services/entity-filer/src/entity_filer/filing_processors/filing_components/alternate_name.py
Outdated
Show resolved
Hide resolved
...services/entity-filer/src/entity_filer/filing_processors/filing_components/alternate_name.py
Outdated
Show resolved
Hide resolved
if start := change_filing.get("filing", {}).get(f"{filint_type}", {}).get("startDate"): | ||
start_date = LegislationDatetime.as_utc_timezone_from_legislation_date_str( | ||
start | ||
) | ||
elif change_filing.effective_date: | ||
start_date = change_filing.effective_date.isoformat() | ||
else: | ||
start_date = LegislationDatetime.now() |
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.
Did you copy this from registration? This is not correct. In change of registration start date cannot be updated, so keep the existing value (start_date=alternate_name.start_date,
) and in conversion it is optional to update start date. Update this accordingly
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.
updated
elif change_filing.effective_date: | ||
start_date = change_filing.effective_date.isoformat() | ||
else: | ||
start_date = LegislationDatetime.now() |
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.
elif change_filing.effective_date: | |
start_date = change_filing.effective_date.isoformat() | |
else: | |
start_date = LegislationDatetime.now() | |
else: | |
start_date = alternate_name.start_date |
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.
updated
identifier=legal_entity.identifier, | ||
name=to_legal_name, | ||
name_type=AlternateName.NameType.OPERATING, | ||
start_date=alternate_name.start_date, |
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.
this should be same as update_proprietor_change
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.
updated
Quality Gate failedFailed conditions E Reliability Rating on New Code (required ≥ A) See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Issue #: /bcgov/entity#18502
Description of changes:
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).