diff --git a/lib/galaxy/model/store/__init__.py b/lib/galaxy/model/store/__init__.py index 65e3f1182271..55c1eb3e47b0 100644 --- a/lib/galaxy/model/store/__init__.py +++ b/lib/galaxy/model/store/__init__.py @@ -450,10 +450,11 @@ def handle_dataset_object_edit(dataset_instance): self._attach_raw_id_if_editing(dataset_instance, dataset_attrs) # Older style... - if "uuid" in dataset_attrs: - dataset_instance.dataset.uuid = dataset_attrs["uuid"] - if "dataset_uuid" in dataset_attrs: - dataset_instance.dataset.uuid = dataset_attrs["dataset_uuid"] + if self.import_options.allow_edit: + if "uuid" in dataset_attrs: + dataset_instance.dataset.uuid = dataset_attrs["uuid"] + if "dataset_uuid" in dataset_attrs: + dataset_instance.dataset.uuid = dataset_attrs["dataset_uuid"] self._session_add(dataset_instance)