Change log level for duplicate data table entries to warning

Fixes https://github.com/galaxyproject/galaxy/issues/16987,
though there's probably something to be done for loc files
being loaded from tools. At the minimum this is a versioning
issue, if a new version of featureCounts comes with a new
built-in reference then an old version shouldn't use it,
and vice-versa. Seems like a hard problem to solve.
This commit is contained in:
mvdbeek
2023-11-08 10:38:47 +01:00
parent cd93598b87
commit ec32669cf5
+7 -1
View File
@@ -250,6 +250,11 @@ class ToolDataTable(Dictifiable):
self.add_entry(
entry, allow_duplicates=allow_duplicates, persist=persist, entry_source=entry_source, **kwd
)
except MessageException as e:
if e.type == "warning":
log.warning(str(e))
else:
log.error(str(e))
except Exception as e:
log.error(str(e))
return self._loaded_content_version
@@ -686,7 +691,8 @@ class TabularToolDataTable(ToolDataTable):
self.data.append(fields)
else:
raise MessageException(
f"Attempted to add fields ({fields}) to data table '{self.name}', but this entry already exists and allow_duplicates is False."
f"Attempted to add fields ({fields}) to data table '{self.name}', but this entry already exists and allow_duplicates is False.",
type="warning",
)
else:
raise MessageException(