Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't try to get the file name of purged files #4066

Merged
merged 1 commit into from May 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions lib/galaxy/managers/datasets.py
Expand Up @@ -186,19 +186,21 @@ def serialize_file_name( self, dataset, key, user=None, **context ):
of the file that contains this dataset's data.
"""
is_admin = self.user_manager.is_admin( user )
# expensive: allow conifg option due to cost of operation
# expensive: allow config option due to cost of operation
if is_admin or self.app.config.expose_dataset_path:
return dataset.file_name
if not dataset.purged:
return dataset.file_name
self.skip()

def serialize_extra_files_path( self, dataset, key, user=None, **context ):
"""
If the config allows or the user is admin, return the file path.
"""
is_admin = self.user_manager.is_admin( user )
# expensive: allow conifg option due to cost of operation
# expensive: allow config option due to cost of operation
if is_admin or self.app.config.expose_dataset_path:
return dataset.extra_files_path
if not dataset.purged:
return dataset.extra_files_path
self.skip()

def serialize_permissions( self, dataset, key, user=None, **context ):
Expand Down
4 changes: 3 additions & 1 deletion templates/show_params.mako
Expand Up @@ -188,7 +188,9 @@
<tr><td>UUID:</td><td>${hda.dataset.uuid}</td></tr>
%endif
%if trans.user_is_admin() or trans.app.config.expose_dataset_path:
<tr><td>Full Path:</td><td>${hda.file_name | h}</td></tr>
%if not hda.purged:
<tr><td>Full Path:</td><td>${hda.file_name | h}</td></tr>
%endif
%endif
</tbody>
</table>
Expand Down