Skip to content

32907: require at least one share class on regular amalgamation appli…#4392

Merged
mruff-aeq merged 1 commit into
bcgov:mainfrom
mruff-aeq:32907-amalgamation-empty-share-classes
May 14, 2026
Merged

32907: require at least one share class on regular amalgamation appli…#4392
mruff-aeq merged 1 commit into
bcgov:mainfrom
mruff-aeq:32907-amalgamation-empty-share-classes

Conversation

@mruff-aeq
Copy link
Copy Markdown
Collaborator

@mruff-aeq mruff-aeq commented May 14, 2026

#32907 : /bcgov/entity#32907

Description of changes:
Posting a regular amalgamation application via POST http://127.0.0.1:5000/api/v2/businesses/T0nRimgoiH/filings?only_validate=true with the payload adjusted to "shareStructure": { "shareClasses": [] } previously succeeded. After this change, the same request returns a 400 containing the error "A company must have at least one Class of Shares.", now aligning with front end logic.

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

@mruff-aeq mruff-aeq requested review from loneil and meawong May 14, 2026 09:47
@sonarqubecloud
Copy link
Copy Markdown

@meawong meawong requested a review from kialj876 May 14, 2026 16:17
if filing_type == CoreFiling.FilingTypes.INCORPORATIONAPPLICATION.value and len(share_classes) == 0:
# For incorporation and amalgamation applications, at least one share class is required, for Alteration can not include if not changing
if filing_type in (CoreFiling.FilingTypes.INCORPORATIONAPPLICATION.value,
CoreFiling.FilingTypes.AMALGAMATIONAPPLICATION.value) and len(share_classes) == 0:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice, I see we have already filtered to validate share structure for regular amalgamation type only: https://github.com/bcgov/lear/blob/main/legal-api/src/legal_api/services/filings/validations/amalgamation_application.py#L86

Copy link
Copy Markdown
Collaborator

@meawong meawong left a comment

Choose a reason for hiding this comment

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

LGTM

@mruff-aeq mruff-aeq merged commit 0927ae8 into bcgov:main May 14, 2026
8 checks passed
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.

2 participants