@@ -79,6 +79,10 @@ def _upload_test_data(self, performs_upload=True):
7979 if not self ._tool .tests :
8080 raise RequestParameterInvalidException ("Tests are not defined." )
8181 self ._test = self ._tool .tests [0 ]
82+
83+ if any (v .type in ("repeat" , "data_collection" ) for v in self ._tool .inputs .values ()):
84+ raise RequestParameterInvalidException ("Not supported input types." )
85+
8286 # All inputs with the type 'data'
8387 self ._data_inputs = {x .name : x for x in self ._tool .input_params if x .type == "data" }
8488 # Datasets from the <test></test> section
@@ -93,19 +97,10 @@ def _upload_test_data(self, performs_upload=True):
9397 input_name = name .split ("|" )[1 ]
9498 if input_name in self ._data_inputs .keys ():
9599 test_datasets .update ({input_name : self ._test .inputs [name ][0 ]})
96- if not test_datasets .keys ():
97- not_supported_input_types = [
98- k for k , v in self ._tool .inputs .items () if v .type == "repeat" or v .type == "data_collection"
99- ]
100- if not_supported_input_types :
101- raise RequestParameterInvalidException ("Not supported input types." )
102- else :
103- # Some tests don't have data inputs at all,
104- # so we can generate a tour without them
105- self ._use_datasets = False
106- return
107100
108- if not performs_upload :
101+ # Some tests don't have data inputs at all,
102+ # so we can generate a tour without them
103+ if not test_datasets .keys () or not performs_upload :
109104 self ._use_datasets = False
110105 return
111106
0 commit comments