33224 business-registry-model: Add additional currency serialization#4328
Conversation
Signed-off-by: Lucas <lucasoneil@gmail.com>
There was a problem hiding this comment.
Pull request overview
Updates the business-registry-model share class serialization and persistence behavior to align with legal-api’s handling of currency_additional (serialized as currencyAdditional), and adds/updates model tests to cover the new behavior.
Changes:
- Include
currencyAdditionalinShareClass.jsonoutput. - Add a ShareClass SQLAlchemy listener rule to clear
currency_additionalwhenevercurrencyis notOTHER. - Update and extend unit tests for share class/series JSON and listener behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| python/common/business-registry-model/src/business_model/models/share_class.py | Adds currencyAdditional to JSON and normalizes currency_additional via the before_insert/before_update listener. |
| python/common/business-registry-model/tests/models/test_share_class.py | Updates JSON expectation and adds explicit tests for currencyAdditional serialization and listener clearing/preservation rules. |
| python/common/business-registry-model/tests/models/test_share_series.py | Updates JSON expectation to include currencyAdditional in nested share class JSON. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Lucas <lucasoneil@gmail.com>
|
| readme = "README.md" | ||
| requires-python = ">=3.13,<3.14" | ||
| dependencies = [ | ||
| "sql-versioning @ git+https://github.com/bcgov/lear.git@main#subdirectory=python/common/sql-versioning-alt", |
There was a problem hiding this comment.
Just merged Anish's dependency update PR for sql-versioning so we may need to specify the version of this package if the new one causes any issues
There was a problem hiding this comment.
K, will merge this and see if there's any build problem from that when importing into a reliant service


Issue #: /bcgov/entity#33224
Description of changes:
Match the changes made to the legal-api models for
currency_additional. Some were never made in thisbusiness-registry-modelduplicate.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).