mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-08-30 16:58:03 +08:00
Merge pull request #23351 from guerler/fixes.013
Multiple select inputs are optional by default
This commit is contained in:
@@ -246,10 +246,10 @@ def _from_input_source_galaxy(input_source: InputSource, profile: float) -> Tool
|
||||
)
|
||||
elif param_type == "select":
|
||||
# Function... example in devteam cummeRbund.
|
||||
optional = input_source.parse_optional()
|
||||
dynamic_options_config = input_source.parse_dynamic_options()
|
||||
is_static = dynamic_options_config is None
|
||||
multiple = input_source.get_bool("multiple", False)
|
||||
optional = input_source.parse_optional(multiple)
|
||||
options: list[LabelValue] | None = None
|
||||
if is_static:
|
||||
options = []
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<tool id="gx_select_multiple_no_options_validation" name="gx_select_multiple_no_options_validation" version="1.0.0">
|
||||
<command><![CDATA[
|
||||
echo '$parameter' >> '$output'
|
||||
]]></command>
|
||||
<inputs>
|
||||
<param name="parameter" type="select" multiple="true">
|
||||
<option value="--ex1">Ex1</option>
|
||||
<option value="ex2">Ex2</option>
|
||||
<option value="--ex3">Ex3</option>
|
||||
<option value="--ex4">Ex4</option>
|
||||
<option value="ex5">Ex5</option>
|
||||
<validator type="no_options" />
|
||||
</param>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="output" format="txt" />
|
||||
</outputs>
|
||||
<tests>
|
||||
</tests>
|
||||
</tool>
|
||||
@@ -729,7 +729,7 @@ gx_select_multiple:
|
||||
request_valid:
|
||||
- parameter: ["--ex1"]
|
||||
- parameter: ["ex2"]
|
||||
# ugh... but these aren't optional...
|
||||
# multiple selects are optional by default
|
||||
- parameter: null
|
||||
- {}
|
||||
request_invalid:
|
||||
@@ -754,7 +754,6 @@ gx_select_multiple:
|
||||
- parameter: ["--ex1"]
|
||||
- parameter: ["ex2"]
|
||||
- {} # could come in linked...
|
||||
# ... hmmm? this should maybe be invalid right?
|
||||
- parameter: null
|
||||
job_internal_valid:
|
||||
- parameter: ["--ex1"]
|
||||
@@ -822,6 +821,18 @@ gx_select_no_options_validation:
|
||||
job_runtime_invalid:
|
||||
- {}
|
||||
|
||||
gx_select_multiple_no_options_validation:
|
||||
job_internal_valid:
|
||||
- parameter: ["--ex1"]
|
||||
- parameter: null
|
||||
job_internal_invalid:
|
||||
- {}
|
||||
job_runtime_valid:
|
||||
- parameter: ["--ex1"]
|
||||
- parameter: null
|
||||
job_runtime_invalid:
|
||||
- {}
|
||||
|
||||
gx_genomebuild:
|
||||
request_valid:
|
||||
- parameter: hg19
|
||||
|
||||
Reference in New Issue
Block a user