Skip to content

Commit 7f2ef4c

Browse files
authored
Merge pull request #21696 from mvdbeek/claude/fix-workflow-origin-handling-xZXsh
[26.0] Fix storing origin for workflow landing requests
2 parents b837bce + b32dec8 commit 7f2ef4c

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

lib/galaxy/managers/landing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ def create_workflow_landing_request(self, payload: CreateWorkflowLandingRequestP
185185
model.request_state = request_state
186186

187187
model.public = payload.public
188+
model.origin = str(payload.origin) if payload.origin else None
188189
self._save(model)
189190
return self._workflow_response(model)
190191

lib/galaxy_test/api/test_landing.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,25 @@ def test_tool_landing_invalid(self):
6767
assert_error_code_is(response, 400008)
6868
assert "Input should be a valid integer" in response.text
6969

70+
@skip_without_tool("cat1")
71+
def test_workflow_landing_origin(self):
72+
request = _get_simple_landing_payload(self.workflow_populator, public=True)
73+
request = CreateWorkflowLandingRequestPayload(
74+
workflow_id=request.workflow_id,
75+
workflow_target_type=request.workflow_target_type,
76+
request_state=request.request_state,
77+
public=request.public,
78+
origin=HttpUrl("http://example.localhost/"),
79+
)
80+
response = self.dataset_populator.create_workflow_landing(request)
81+
assert response.workflow_id == request.workflow_id
82+
assert response.state == "unclaimed"
83+
assert str(response.origin) == "http://example.localhost/"
84+
response = self.dataset_populator.claim_workflow_landing(response.uuid)
85+
assert response.workflow_id == request.workflow_id
86+
assert response.state == "claimed"
87+
assert str(response.origin) == "http://example.localhost/"
88+
7089
def test_data_landing(self):
7190
data_landing_request_state = DataLandingRequestState(
7291
targets=[

0 commit comments

Comments
 (0)