From 6f98404eebf9bf302ceded775de1ca891f4731e8 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Thu, 25 Dec 2025 10:54:01 +0100 Subject: [PATCH] Fix errors type and maintain error messsage Fixes https://github.com/galaxyproject/galaxy/issues/18874 --- client/src/api/schema/schema.ts | 8 +++++--- lib/galaxy/managers/markdown_util.py | 2 +- lib/galaxy/schema/invocation.py | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/client/src/api/schema/schema.ts b/client/src/api/schema/schema.ts index d9fdc395929..e84d9203460 100644 --- a/client/src/api/schema/schema.ts +++ b/client/src/api/schema/schema.ts @@ -14020,9 +14020,11 @@ export interface components { * Errors * @description Errors associated with the invocation. */ - errors?: { - [key: string]: unknown; - } | null; + errors?: + | { + [key: string]: unknown; + }[] + | null; /** * Galaxy Version * @description The version of Galaxy this object was generated with. diff --git a/lib/galaxy/managers/markdown_util.py b/lib/galaxy/managers/markdown_util.py index 75314767402..82135c2d63b 100644 --- a/lib/galaxy/managers/markdown_util.py +++ b/lib/galaxy/managers/markdown_util.py @@ -418,7 +418,7 @@ class GalaxyInternalMarkdownDirectiveHandler(metaclass=abc.ABCMeta): class ReadyForExportMarkdownDirectiveHandler(GalaxyInternalMarkdownDirectiveHandler): def __init__(self, trans, extra_rendering_data=None): - extra_rendering_data = extra_rendering_data or {} + extra_rendering_data = extra_rendering_data if extra_rendering_data is not None else {} self.trans = trans self.extra_rendering_data = extra_rendering_data diff --git a/lib/galaxy/schema/invocation.py b/lib/galaxy/schema/invocation.py index 76d7ca72761..e3c8ce33cfc 100644 --- a/lib/galaxy/schema/invocation.py +++ b/lib/galaxy/schema/invocation.py @@ -470,7 +470,7 @@ class InvocationReport(Model, WithModelClass): generate_time: Optional[str] = schema.GenerateTimeField generate_version: Optional[str] = schema.GenerateVersionField - errors: Optional[Dict[str, Any]] = Field( + errors: Optional[List[Dict[str, Any]]] = Field( default=None, title="Errors", description="Errors associated with the invocation.",