From 2817fdb5b33c7e55cd5884b1d0f002ce8cd51104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20L=C3=B3pez?= <46503462+davelopez@users.noreply.github.com> Date: Tue, 18 Jan 2022 11:39:34 +0100 Subject: [PATCH] Simplify html extension check Simplified the check a bit here since `endswith` will cover the previous check and also I've removed the preceding `.` to make sure the old check is still covered. --- lib/galaxy/datatypes/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/datatypes/data.py b/lib/galaxy/datatypes/data.py index 0d83bb2d028..b505a9e7c64 100644 --- a/lib/galaxy/datatypes/data.py +++ b/lib/galaxy/datatypes/data.py @@ -369,7 +369,7 @@ class Data(metaclass=DataMeta): """ rel_paths = [] file_paths = [] - if dataset.datatype.composite_type or dataset.extension == '.html' or dataset.extension.endswith('.html'): + if dataset.datatype.composite_type or dataset.extension.endswith('html'): main_file = f"{name}.html" rel_paths.append(main_file) file_paths.append(dataset.file_name)