From eef942a24027bb818f6cfc276c15ec85ad68b731 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Fri, 17 Jan 2025 11:22:27 +0100 Subject: [PATCH] Add number coercion to string in StrictModel configuration This will workaround an issue with jinja templates rendering a field composed only by numbers to be considered a number when the field is of type string, causing the config model validation to fail. Trying to cast the value to string using the jinja template itself did not work. --- lib/galaxy/util/config_templates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/util/config_templates.py b/lib/galaxy/util/config_templates.py index 79f0bed52ca9..61c907887f6b 100644 --- a/lib/galaxy/util/config_templates.py +++ b/lib/galaxy/util/config_templates.py @@ -57,7 +57,7 @@ class StrictModel(BaseModel): - model_config = ConfigDict(extra="forbid") + model_config = ConfigDict(extra="forbid", coerce_numbers_to_str=True) class BaseTemplateVariable(StrictModel):