Unverified Commit eef942a2 authored by davelopez's avatar davelopez
Browse files

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.
parent 9b43bf58
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ EnvironmentDict = Dict[str, str]


class StrictModel(BaseModel):
    model_config = ConfigDict(extra="forbid")
    model_config = ConfigDict(extra="forbid", coerce_numbers_to_str=True)


class BaseTemplateVariable(StrictModel):