From 45c4675a471891b6976dc7d384cdb2f8ac1fa37f Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Fri, 29 Mar 2024 22:11:47 +0100 Subject: [PATCH] Normalize extensions when loading tool Fixes https://github.com/galaxyproject/galaxy/issues/17864 --- lib/galaxy/tools/parameters/basic.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/galaxy/tools/parameters/basic.py b/lib/galaxy/tools/parameters/basic.py index be1ed9002c0d..fed75d435693 100644 --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -1864,11 +1864,10 @@ def _parse_formats(self, trans, input_source): """ Build list of classes for supported data formats """ - self.extensions = input_source.get("format", "data").split(",") + self.extensions = [extension.strip().lower() for extension in input_source.get("format", "data").split(",")] formats = [] if self.datatypes_registry: # This may be None when self.tool.app is a ValidationContext - normalized_extensions = [extension.strip().lower() for extension in self.extensions] - for extension in normalized_extensions: + for extension in self.extensions: datatype = self.datatypes_registry.get_datatype_by_extension(extension) if datatype is not None: formats.append(datatype)