Skip to content

Commit 0581475

Browse files
PRMT-72 Add ITOC ODS code to org_data (#633)
1 parent 8311592 commit 0581475

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lambdas/services/ods_api_service.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ def fetch_organisation_with_permitted_role(self, ods_code_list: list[str]) -> Di
6060

6161
if ods_code in itoc_ods_codes:
6262
logger.info(f"ODS code {ods_code} is ITOC, returning org data")
63-
return parse_ods_response({}, "", "ITOC")
63+
itoc_org_data = {"Organisation": {"OrgId": {"extension": ods_code}}}
64+
return parse_ods_response(itoc_org_data, "", "ITOC")
6465

6566
org_data = self.fetch_organisation_data(ods_code)
6667

lambdas/tests/unit/services/test_ods_api_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def test_fetch_org_with_permitted_role_itoc(mocker):
173173

174174
expected = {
175175
"name": "",
176-
"org_ods_code": "",
176+
"org_ods_code": itoc_ods,
177177
"role_code": "",
178178
"icb_ods_code": "ITOC",
179179
}

0 commit comments

Comments
 (0)