Skip to content

Commit 6c787eb

Browse files
authored
Merge pull request #5 from softwareone-platform/bugfix/MPT-9003/fix-rql-notation
MPT-9003 Fix RQL notation to filter for organization
2 parents a7213cb + 0708624 commit 6c787eb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ffc/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ def create_organization(
109109
def get_organization_by_external_id(self, agreement_id):
110110
headers = self._get_headers()
111111

112-
rql_filter = f"operations_external_id={agreement_id}"
112+
rql_filter = f"eq(operations_external_id,{agreement_id})"
113113
response = requests.get(
114114
urljoin(
115115
self._api_base_url,
116-
f"/ops/v1/organizations?&{rql_filter}&limit=1",
116+
f"/ops/v1/organizations?{rql_filter}&limit=1",
117117
),
118118
headers=headers,
119119
)

tests/ffc/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def test_get_organization(mocker, mock_jwt_encoder, ffc_client_settings):
216216
token = mock_jwt_encoder(now)
217217

218218
responses.get(
219-
f"https://local.local/ops/v1/organizations?operations_external_id={agreement_id}&limit=1",
219+
f"https://local.local/ops/v1/organizations?eq(operations_external_id,{agreement_id})&limit=1",
220220
status=200,
221221
json={"items": [{"id": "test-organization"}]},
222222
match=[

0 commit comments

Comments
 (0)