Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion auth-api/src/auth_api/schemas/affiliation.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ class Meta(BaseSchema.Meta): # pylint: disable=too-few-public-methods
class AffiliationWithOrgSchema(AffiliationSchema):
"""AffiliationSchema that includes nested organization details."""

organization = fields.Nested("OrgSchema", attribute="org", only=("id", "uuid", "name", "branch_name"))
organization = fields.Nested("OrgSchema", attribute="org", only=("uuid", "name", "branch_name"))
3 changes: 0 additions & 3 deletions auth-api/tests/unit/services/test_affiliation.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def test_create_affiliation(session, auth_mock, monkeypatch): # pylint:disable=
nested = result["business"]["affiliations"]
assert len(nested) > 0
nested_org = nested[0]["organization"]
assert nested_org["id"] == org_id
assert nested_org["uuid"] == str(org_dictionary["uuid"])
assert nested_org["name"] == org_dictionary["name"]

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

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