Skip to content

Commit a7213cb

Browse files
authored
Merge pull request #4 from softwareone-platform/bugfix/MPT-9001/fix-organization-return-value
MPT-9002 Fix get organization by external_id response
2 parents a1ade0a + a5bb053 commit a7213cb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ffc/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def get_organization_by_external_id(self, agreement_id):
120120

121121
response.raise_for_status()
122122

123-
return response.json()["items"]
123+
return response.json()["items"][0]
124124

125125
def _get_headers(self):
126126
return {

tests/ffc/test_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,6 @@ def test_get_organization(mocker, mock_jwt_encoder, ffc_client_settings):
232232
)
233233

234234
client = get_ffc_client()
235-
organizations = client.get_organization_by_external_id(agreement_id)
235+
organization = client.get_organization_by_external_id(agreement_id)
236236

237-
assert organizations == [{"id": "test-organization"}]
237+
assert organization == {"id": "test-organization"}

0 commit comments

Comments
 (0)