Skip to content

Commit

Permalink
19904 email updates for amalgamation application (bcgov#2478) cherry …
Browse files Browse the repository at this point in the history
…pick fixes
  • Loading branch information
JazzarKarim committed Mar 20, 2024
1 parent 380b4c3 commit fee162a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions legal-api/src/legal_api/models/legal_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,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

return ar_min_date, ar_max_date

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from entity_queue_common.service_utils import logger
from flask import current_app
from jinja2 import Template
from legal_api.models import AmalgamatingBusiness, Amalgamation, Business, Filing
from legal_api.models import AmalgamatingBusiness, Amalgamation, LegalEntity, Filing

from entity_emailer.email_processors import get_filing_info, get_recipients, substitute_template_parts

Expand Down Expand Up @@ -161,7 +161,7 @@ def process(email_info: dict, token: str) -> dict: # pylint: disable=too-many-l
filled_template = substitute_template_parts(template)
# render template with vars
legal_type = business.get('legalType')
numbered_description = Business.BUSINESSES.get(legal_type, {}).get('numberedDescription')
numbered_description = LegalEntity.BUSINESSES.get(legal_type, {}).get('numberedDescription')
jnja_template = Template(filled_template, autoescape=True)

html_out = jnja_template.render(
Expand Down

0 comments on commit fee162a

Please sign in to comment.