diff --git a/lib/galaxy/managers/landing.py b/lib/galaxy/managers/landing.py index 38d085edab81..22c83eed61d9 100644 --- a/lib/galaxy/managers/landing.py +++ b/lib/galaxy/managers/landing.py @@ -156,6 +156,7 @@ def create_workflow_landing_request(self, payload: CreateWorkflowLandingRequestP model.client_secret = payload.client_secret model.request_state = self.validate_workflow_request_state(payload.request_state) model.public = payload.public + model.origin = str(payload.origin) if payload.origin else None self._save(model) return self._workflow_response(model) diff --git a/lib/galaxy_test/api/test_landing.py b/lib/galaxy_test/api/test_landing.py index a9e4c12dd426..51cf31471573 100644 --- a/lib/galaxy_test/api/test_landing.py +++ b/lib/galaxy_test/api/test_landing.py @@ -67,6 +67,25 @@ def test_tool_landing_invalid(self): assert_error_code_is(response, 400008) assert "Input should be a valid integer" in response.text + @skip_without_tool("cat1") + def test_workflow_landing_origin(self): + request = _get_simple_landing_payload(self.workflow_populator, public=True) + request = CreateWorkflowLandingRequestPayload( + workflow_id=request.workflow_id, + workflow_target_type=request.workflow_target_type, + request_state=request.request_state, + public=request.public, + origin=HttpUrl("http://example.localhost/"), + ) + response = self.dataset_populator.create_workflow_landing(request) + assert response.workflow_id == request.workflow_id + assert response.state == "unclaimed" + assert str(response.origin) == "http://example.localhost/" + response = self.dataset_populator.claim_workflow_landing(response.uuid) + assert response.workflow_id == request.workflow_id + assert response.state == "claimed" + assert str(response.origin) == "http://example.localhost/" + def test_data_landing(self): data_landing_request_state = DataLandingRequestState( targets=[