Skip to content

Commit

Permalink
Correct access for FTP files in composite datatype
Browse files Browse the repository at this point in the history
  • Loading branch information
bgruening authored and hexylena committed Apr 20, 2018
1 parent c4e1242 commit a5c75d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/galaxy/tools/parameters/grouping.py
Expand Up @@ -214,7 +214,10 @@ def get_composite_dataset_name(self, context):
if dataset_name is None:
filenames = list()
for composite_file in context.get('files', []):
filenames.append(composite_file.get('file_data', {}).get('filename', ''))
if not composite_file.get('ftp_files', ''):
filenames.append(composite_file.get('file_data', {}).get('filename', ''))
else:
filenames.append(composite_file.get('ftp_files', [])[0])
dataset_name = os.path.commonprefix(filenames).rstrip('.') or None
if dataset_name is None:
dataset_name = 'Uploaded Composite Dataset (%s)' % self.get_file_type(context)
Expand Down

0 comments on commit a5c75d2

Please sign in to comment.