mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #16988 from mvdbeek/warning_for_duplicate_log_files
[23.1] Change log level for duplicate data table entries to warning
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user