Skip to content

Commit

Permalink
Fix DynamicOptions.get_options() when loc file is missing
Browse files Browse the repository at this point in the history
Fix #2987
  • Loading branch information
nsoranzo committed May 9, 2018
1 parent d5ec01d commit 993f5f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/galaxy/tools/parameters/dynamic_options.py
Expand Up @@ -623,8 +623,10 @@ def get_fields(self, trans, other_values):
options = self.parse_file_fields(StringIO(contents))
elif self.tool_data_table:
options = self.tool_data_table.get_fields()
else:
elif self.file_fields:
options = list(self.file_fields)
else:
options = []
for filter in self.filters:
options = filter.filter_options(options, trans, other_values)
return options
Expand Down Expand Up @@ -659,7 +661,7 @@ def get_field_by_name_for_value(self, field_name, value, trans, other_values):

def get_options(self, trans, other_values):
rval = []
if self.file_fields is not None or self.tool_data_table is not None or self.dataset_ref_name is not None:
if self.file_fields is not None or self.tool_data_table is not None or self.dataset_ref_name is not None or self.missing_index_file:
options = self.get_fields(trans, other_values)
for fields in options:
rval.append((fields[self.columns['name']], fields[self.columns['value']], False))
Expand Down

0 comments on commit 993f5f5

Please sign in to comment.