Skip to content

Commit

Permalink
update IA and Alternation (#2585)
Browse files Browse the repository at this point in the history
  • Loading branch information
tshyun24 authored Apr 11, 2024
1 parent 93c28d0 commit 2d4c389
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions legal-api/report-templates/incorporationApplication.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
</table>
<div class="business-name-header">
<label class="lbl-business-name">
{% if nameRequest.businessName %}
{{ nameRequest.businessName }}
{% if nameRequest.legalName %}
{{ nameRequest.legalName }}
{% else %}
{{ numberedDescription }}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% if not nameRequest.nrNumber%}
A company name using the Incorporation Number will be provided on the Recognition Date and Time.
{% else %}
<span class="bold">{{nameRequest.businessName}}</span>
<span class="bold">{{nameRequest.legalName}}</span>
{% endif %}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{% if not nameRequest.nrNumber %}
The company is to be incorporated with a name created by adding "{{numberedLegalNameSuffix}}" after the incorporation number.
{% else %}
{{nameRequest.businessName}}
{{nameRequest.legalName}}
{% endif %}
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion legal-api/src/legal_api/models/entity_role.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def get_entity_roles_by_filing(filing_id: int, end_date: datetime = None, role:
"""Return the parties that match the filter conditions."""
entity_roles = (
db.session.query(EntityRole)
.filter(EntityRole.filing_id == filing_id)
.filter(EntityRole.filing_id <= filing_id)
.filter(cast(EntityRole.appointment_date, Date) <= end_date)
.filter(
or_(
Expand Down
2 changes: 1 addition & 1 deletion legal-api/src/legal_api/reports/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ def _format_alteration_data(self, filing):
filing["listOfTranslations"] = filing["alteration"].get("nameTranslations", [])
# Get previous translations for deleted translations. No record created in aliases version for deletions
filing["previousNameTranslations"] = VersionedBusinessDetailsService.get_name_translations_revision(
self._filing.transaction_id, self._business.id
self._filing, self._business.id
)
if filing["alteration"].get("shareStructure", None):
filing["shareClasses"] = filing["alteration"]["shareStructure"].get("shareClasses", [])
Expand Down
3 changes: 2 additions & 1 deletion legal-api/src/legal_api/services/business_details_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,9 @@ def get_name_translations_revision(filing, legal_entity_id) -> dict:
)

name_translations_version = history_cls(AlternateName)
columns_to_select = [col for col in name_translations_version.__table__.columns if col.name != 'changed']
name_translations_history = (
db.session.query(name_translations_version)
db.session.query(*columns_to_select)
.filter(name_translations_version.change_filing_id == filing.id)
.filter(name_translations_version.legal_entity_id == legal_entity_id)
.filter(name_translations_version.name_type == "TRANSLATION")
Expand Down

0 comments on commit 2d4c389

Please sign in to comment.