diff --git a/lib/galaxy/jobs/actions/post.py b/lib/galaxy/jobs/actions/post.py index 6e5e8c54204..380803ccb29 100644 --- a/lib/galaxy/jobs/actions/post.py +++ b/lib/galaxy/jobs/actions/post.py @@ -330,8 +330,7 @@ class TagDatasetAction(DefaultJobAction): @classmethod def execute(cls, app, sa_session, action, job, replacement_dict): if action.action_arguments: - tags = [t.strip() for t in action.action_arguments.get('tags', '').split(',') if t.strip()] - tags = [t.replace('#', 'name:') if t.startswith('#') else t for t in tags] + tags = [t.replace('#', 'name:') if t.startswith('#') else t for t in [t.strip() for t in action.action_arguments.get('tags', '').split(',') if t.strip()]] if tags: for dataset_assoc in job.output_datasets: if action.output_name == '' or dataset_assoc.name == action.output_name: