Skip to content

Commit 2877596

Browse files
authored
Merge pull request #161 from NHSDigital/DTOSS-13333-accept-worklist-update-status
Accept worklist.update_status action type as this is what Manage sends
2 parents f547802 + 5ee8186 commit 2877596

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/relay_listener.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def process_action(self, payload: dict):
9494
return {"status": "echo", "payload": payload}
9595
elif action_name == "worklist.create_item":
9696
return CreateWorklistItem(self.storage).call(payload)
97-
elif action_name == "worklist.update_item_status":
97+
elif action_name == "worklist.update_status":
9898
return UpdateWorklistItemStatus(self.storage).call(payload)
9999
else:
100100
raise ValueError(f"Unsupported action: {action_name}")

tests/integration/test_relay_listener_processes_actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class TestRelayListenerProcessesActions:
1212
def update_payload(self):
1313
return {
1414
"action_id": "action-12345",
15-
"action_type": "worklist.update_item_status",
15+
"action_type": "worklist.update_status",
1616
"parameters": {"worklist_item": {"accession_number": "ACC999999", "status": "in progress"}},
1717
}
1818

tests/test_relay_listener.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def test_process_update_item_status_action(self, storage_instance, listener_payl
105105

106106
update_payload = {
107107
"action_id": "action-12345",
108-
"action_type": "worklist.update_item_status",
108+
"action_type": "worklist.update_status",
109109
"parameters": {"worklist_item": {"accession_number": "ACC999999", "status": "IN PROGRESS"}},
110110
}
111111

0 commit comments

Comments
 (0)