From 9a9c4a8eb85211d627d5dbe3573656eb9c22e2e3 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 29 Jul 2024 10:28:44 -0400 Subject: [PATCH] Do not set uuid on dataset imports. --- lib/galaxy/model/store/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/model/store/__init__.py b/lib/galaxy/model/store/__init__.py index c2a616c50419..063bbc295dd1 100644 --- a/lib/galaxy/model/store/__init__.py +++ b/lib/galaxy/model/store/__init__.py @@ -289,10 +289,11 @@ def remap_objects(p, k, obj): 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) self._flush()