diff --git a/lib/galaxy/webapps/galaxy/controllers/workflow.py b/lib/galaxy/webapps/galaxy/controllers/workflow.py index ca0cb88b4c3c..085834f67ec0 100644 --- a/lib/galaxy/webapps/galaxy/controllers/workflow.py +++ b/lib/galaxy/webapps/galaxy/controllers/workflow.py @@ -320,6 +320,7 @@ def build_from_current_history( # Optionally target a different history than the current one. history = self.history_manager.get_owned(self.decode_id(history_id), trans.user, current_history=history) if not user: + trans.response.status = 403 return trans.show_error_message("Must be logged in to create workflows") if (job_ids is None and dataset_ids is None) or workflow_name is None: jobs, warnings = summarize(trans, history) diff --git a/lib/galaxy/workflow/extract.py b/lib/galaxy/workflow/extract.py index 5d10aa8a8a19..6072f322d9cb 100644 --- a/lib/galaxy/workflow/extract.py +++ b/lib/galaxy/workflow/extract.py @@ -321,7 +321,15 @@ def __summarize_dataset_collection(self, dataset_collection): # tracking with creating_job_associations. Will delete at some point. elif dataset_collection.implicit_output_name: # TODO: Optimize db call - dataset_instance = dataset_collection.collection.dataset_instances[0] + element = dataset_collection.collection.first_dataset_element + if not element: + # Got no dataset instance to walk back up to creating job. + # TODO track this via tool request model + job = DatasetCollectionCreationJob(dataset_collection) + self.jobs[job] = [(None, dataset_collection)] + return + else: + dataset_instance = element.hda if not self.__check_state(dataset_instance): # Just checking the state of one instance, don't need more but # makes me wonder if even need this check at all?