Unverified Commit 446c8deb authored by Marius van den Beek's avatar Marius van den Beek Committed by GitHub
Browse files

Merge pull request #20479 from mvdbeek/prevent_launching_autodetect_on_purged_dataset

[24.2] Prevent running datatype autodetect on purged datasets
parents 6176b007 a7eaf5f7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -367,6 +367,8 @@ class DatasetInterface(BaseUIController, UsesAnnotations, UsesItemRatings, UsesE
                        "This dataset is currently being used as input or output.  You cannot change datatype until the jobs have completed or you have canceled them."
                    )
                else:
                    # we can't detect datatype if the dataset is not on disk
                    self.hda_manager.ensure_dataset_on_disk(trans, data)
                    path = data.dataset.get_file_name()
                    datatype = guess_ext(path, trans.app.datatypes_registry.sniff_order)
                    trans.app.datatypes_registry.change_datatype(data, datatype)