Skip to content

Commit 553921e

Browse files
authored
Remove id from affiliations call (#3659)
1 parent cc63dd5 commit 553921e

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

auth-api/src/auth_api/schemas/affiliation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ class Meta(BaseSchema.Meta): # pylint: disable=too-few-public-methods
3535
class AffiliationWithOrgSchema(AffiliationSchema):
3636
"""AffiliationSchema that includes nested organization details."""
3737

38-
organization = fields.Nested("OrgSchema", attribute="org", only=("id", "uuid", "name", "branch_name"))
38+
organization = fields.Nested("OrgSchema", attribute="org", only=("uuid", "name", "branch_name"))

auth-api/tests/unit/services/test_affiliation.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def test_create_affiliation(session, auth_mock, monkeypatch): # pylint:disable=
6565
nested = result["business"]["affiliations"]
6666
assert len(nested) > 0
6767
nested_org = nested[0]["organization"]
68-
assert nested_org["id"] == org_id
6968
assert nested_org["uuid"] == str(org_dictionary["uuid"])
7069
assert nested_org["name"] == org_dictionary["name"]
7170

@@ -591,7 +590,6 @@ def test_find_affiliations_for_new_business(session, auth_mock, nr_mock, monkeyp
591590
assert affiliated_entities[0]["nr_number"] == business_identifier1
592591
assert affiliated_entities[0]["name"] == name1
593592
for aff in affiliated_entities[0]["affiliations"]:
594-
assert aff["organization"]["id"] == org_id
595593
assert aff["organization"]["uuid"] == str(org_dictionary["uuid"])
596594

597595
delete_affiliation_request = DeleteAffiliationRequest(org_id=org_id, business_identifier=business_identifier2)
@@ -713,6 +711,5 @@ def test_find_affiliation(session, auth_mock): # pylint:disable=unused-argument
713711
# nested business.affiliations should include organization details
714712
for nested in affiliation["business"]["affiliations"]:
715713
nested_org = nested["organization"]
716-
assert nested_org["id"] == org_id
717714
assert nested_org["uuid"] == str(org_dictionary["uuid"])
718715
assert nested_org["name"] == org_dictionary["name"]

0 commit comments

Comments
 (0)