From 45260c77f88e7e0ae50346ca3fb76edf44898175 Mon Sep 17 00:00:00 2001 From: Kial Jinnah Date: Mon, 21 Sep 2026 15:08:49 -0400 Subject: [PATCH 1/2] 34987 Legal API - comp party hotfix Signed-off-by: Kial Jinnah --- legal-api/poetry.lock | 6 +++--- legal-api/pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/legal-api/poetry.lock b/legal-api/poetry.lock index cb2d696da5..423b6253bc 100644 --- a/legal-api/poetry.lock +++ b/legal-api/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.4.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.3.1 and should not be changed by hand. [[package]] name = "aiofiles" @@ -316,7 +316,7 @@ files = [ [[package]] name = "business-model" -version = "3.4.14" +version = "3.4.16" description = "" optional = false python-versions = ">=3.13,<3.14" @@ -343,7 +343,7 @@ sql-versioning = {git = "https://github.com/bcgov/lear.git", rev = "main", subdi type = "git" url = "https://github.com/bcgov/lear.git" reference = "main" -resolved_reference = "9b2f5287efa993be93b026528e962b417f11e2fd" +resolved_reference = "09cea837c5c2d595807c33fbbf0febc4a72257bd" subdirectory = "python/common/business-registry-model" [[package]] diff --git a/legal-api/pyproject.toml b/legal-api/pyproject.toml index 1cfdfb531e..5653b54754 100644 --- a/legal-api/pyproject.toml +++ b/legal-api/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "legal-api" -version = "3.1.31" +version = "3.1.31.post1" description = "" authors = [ {name = "thor",email = "1042854+thorwolpert@users.noreply.github.com"} From 7640813648f7bccb1e564e23747fb3f087b68b6e Mon Sep 17 00:00:00 2001 From: Kial Jinnah Date: Mon, 21 Sep 2026 15:49:16 -0400 Subject: [PATCH 2/2] chore: test fixes Signed-off-by: Kial Jinnah --- .../filings/validations/test_change_of_registration.py | 4 +++- .../unit/services/filings/validations/test_registration.py | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/legal-api/tests/unit/services/filings/validations/test_change_of_registration.py b/legal-api/tests/unit/services/filings/validations/test_change_of_registration.py index 483c953021..5f4affffe8 100644 --- a/legal-api/tests/unit/services/filings/validations/test_change_of_registration.py +++ b/legal-api/tests/unit/services/filings/validations/test_change_of_registration.py @@ -351,9 +351,11 @@ def test_change_of_registration_completing_party_name(app, session, jwt, test_na sub='sub', iss='iss', idp_userid='123', login_source=login_source) user.save() + extra_claims = {'firstname': ' '.join(filter(None, [firstname, middlename])), 'lastname': lastname} + with patch.object(NameXService, 'query_nr_number', return_value=MockResponse(nr_response)): with patch.object(NaicsService, 'find_by_code', return_value=naics_response): - with jwt_request_context(app, jwt, roles, login_source=login_source): + with jwt_request_context(app, jwt, roles, login_source=login_source, extra_claims=extra_claims): err = validate(business, filing) if expected_error: diff --git a/legal-api/tests/unit/services/filings/validations/test_registration.py b/legal-api/tests/unit/services/filings/validations/test_registration.py index d0e72474c7..aba1d83afd 100644 --- a/legal-api/tests/unit/services/filings/validations/test_registration.py +++ b/legal-api/tests/unit/services/filings/validations/test_registration.py @@ -450,8 +450,10 @@ def mock_check(permissions_msg, filing_type): 'test_name, roles, login_source, user_name, token_name, expected_error', [ ('client_name_matches', [BASIC_USER], 'BCSC', ('Joe', 'P', 'Swanson'), None, None), ('client_long_name_matches', [BASIC_USER], 'BCSC', - ('Josephakis Vasilliadopolous Constantinople', None, 'Swanson'), None, None), - ('client_name_mismatch', [BASIC_USER], 'BCSC', ('Different', None, 'Person'), None, MISMATCH_ERROR), + ('Josephakis Vasilliadopolous Constantinople', None, 'Swanson'), + ('Josephakis Vasilliadopolous Constantinople', 'Swanson'), None), + ('client_name_mismatch', [BASIC_USER], 'BCSC', ('Different', None, 'Person'), ('Different', 'Person'), + MISMATCH_ERROR), ('client_first_filing_user_created_from_token', [BASIC_USER], 'BCSC', None, ('Joe P', 'Swanson'), None), ('client_first_filing_token_name_mismatch', [BASIC_USER], 'BCSC', None, ('Different', 'Person'), MISMATCH_ERROR),