Skip to content

Commit

Permalink
Add number coercion to string in StrictModel configuration
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
davelopez committed Jan 17, 2025
1 parent 9b43bf5 commit eef942a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/galaxy/util/config_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit eef942a

Please sign in to comment.