-
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
19904 email updates for amalgamation application #2478
Conversation
@@ -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 |
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.
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)
Quality Gate failedFailed conditions |
@@ -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']: |
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.
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 = { |
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.
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)
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.
LGTM
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).