Skip to content

Commit

Permalink
Add download url for metadata file.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Aug 5, 2016
1 parent 0bf9417 commit e219dfe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/galaxy/managers/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,12 @@ def serialize_meta_files( self, dataset_assoc, key, **context ):
meta_files = []
for meta_type in dataset_assoc.metadata.spec.keys():
if isinstance( dataset_assoc.metadata.spec[ meta_type ].param, galaxy.datatypes.metadata.FileParameter ):
meta_files.append( dict( file_type=meta_type ) )
meta_files.append(
dict( file_type=meta_type,
download_url=self.url_for( 'history_contents_get_metadata_file',
history_id=self.app.security.encode_id(dataset_assoc.history_id),
history_content_id=self.app.security.encode_id(dataset_assoc.id),
metadata_file=meta_type) ) )
return meta_files

def serialize_metadata( self, dataset_assoc, key, excluded=None, **context ):
Expand Down

0 comments on commit e219dfe

Please sign in to comment.