|
29 | 29 | WorkflowRequestStepState, |
30 | 30 | ) |
31 | 31 | from galaxy.model.base import ensure_object_added_to_session |
32 | | -from galaxy.tool_util_models.parameters import DataOrCollectionRequestAdapter |
| 32 | +from galaxy.tool_util_models.parameters import ( |
| 33 | + DataOrCollectionRequestAdapter, |
| 34 | + DataRequestCollectionUri, |
| 35 | + DataRequestUri, |
| 36 | + FileRequestUri, |
| 37 | +) |
33 | 38 | from galaxy.tools.parameters.basic import ParameterValueError |
34 | 39 | from galaxy.tools.parameters.meta import expand_workflow_inputs |
35 | 40 | from galaxy.tools.parameters.workflow_utils import NO_REPLACEMENT |
@@ -422,20 +427,20 @@ def build_workflow_run_configs( |
422 | 427 | content = app.dataset_collection_manager.get_dataset_collection_instance( |
423 | 428 | trans, "history", data_request.id |
424 | 429 | ) |
425 | | - elif data_request.class_ == "Collection": |
426 | | - request_input = dereference_input_to_hdca(trans, data_request, history) |
| 430 | + elif isinstance(data_request, DataRequestCollectionUri): |
| 431 | + hdca_input = dereference_input_to_hdca(trans, data_request, history) |
427 | 432 | added_to_history = True |
428 | 433 | content = InputWithRequest( |
429 | | - input=request_input, |
| 434 | + input=hdca_input, |
430 | 435 | request=data_request.model_dump(mode="json"), |
431 | 436 | ) |
432 | 437 | if not data_request.deferred: |
433 | 438 | requires_materialization = True |
434 | | - elif data_request.src == "url" or data_request.class_ == "File": |
435 | | - request_input = dereference_input_to_hda(trans, data_request, history) |
| 439 | + elif isinstance(data_request, (DataRequestUri, FileRequestUri)): |
| 440 | + hda_input = dereference_input_to_hda(trans, data_request, history) |
436 | 441 | added_to_history = True |
437 | 442 | content = InputWithRequest( |
438 | | - input=request_input, |
| 443 | + input=hda_input, |
439 | 444 | request=data_request.model_dump(mode="json"), |
440 | 445 | ) |
441 | 446 | if not data_request.deferred: |
|
0 commit comments