Skip to content
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

19904 email updates for amalgamation application #2478

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

vysakh-menon-aot
Copy link
Collaborator

Issue #: /bcgov/entity#19904

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).

@vysakh-menon-aot vysakh-menon-aot self-assigned this Feb 27, 2024
@@ -298,8 +298,7 @@ def get_ar_dates(self, next_ar_year):
ar_min_date = datetime(next_ar_year, self.founding_date.month, self.founding_date.day).date()
ar_max_date = ar_min_date + datedelta.datedelta(days=60)

if ar_max_date > datetime.utcnow().date():
ar_max_date = datetime.utcnow().date()
ar_max_date = min(ar_max_date, datetime.utcnow().date()) # ar_max_date cannot be in future
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new pylint error says Consider using 'ar_max_date = min(ar_max_date, datetime.utcnow().date())' instead of unnecessary if block (consider-using-min-builtin)

Copy link

sonarcloud bot commented Feb 27, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
17.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@@ -81,7 +81,7 @@ def get(identifier, filing_id=None): # pylint: disable=too-many-return-statemen
if not rv.storage:
return jsonify({'message': f'{identifier} no filings found'}), HTTPStatus.NOT_FOUND
if str(request.accept_mimetypes) == 'application/pdf' and filing_id:
if rv.filing_type == 'incorporationApplication':
if rv.filing_type in ['amalgamationApplication', 'incorporationApplication']:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately we are still using v1 resources to get documents in entity-emailer

@@ -134,30 +135,60 @@ def _get_pdfs(
def process(email_info: dict, token: str) -> dict: # pylint: disable=too-many-locals, , too-many-branches
"""Build the email for Amalgamation notification."""
logger.debug('filing_notification: %s', email_info)
amalgamation_application_names = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use legal_api/core/meta/filing.py to get displayName but it will cause issues when we merge legal name branch (as we won't keep legal-api dependency anymore)

Copy link
Contributor

@jamespaologarcia jamespaologarcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vysakh-menon-aot vysakh-menon-aot merged commit 3adb113 into bcgov:main Feb 27, 2024
10 of 11 checks passed
JazzarKarim pushed a commit to JazzarKarim/lear that referenced this pull request Mar 20, 2024
JazzarKarim added a commit to JazzarKarim/lear that referenced this pull request Mar 20, 2024
JazzarKarim pushed a commit to JazzarKarim/lear that referenced this pull request Mar 20, 2024
JazzarKarim added a commit to JazzarKarim/lear that referenced this pull request Mar 20, 2024
PaulGarewal pushed a commit to PaulGarewal/lear that referenced this pull request Mar 26, 2024
PaulGarewal pushed a commit to PaulGarewal/lear that referenced this pull request Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants