You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Becausetoken field uses BeforeValidator,
its actual value type in .env file should be str (i.e. param type of parse_token)
but inside EnvSettingsSource.prepare_field_value it just concludes that it is a complex type.
I think it would be better to consider the input type of the validation function, especially in case of the validator is BeforeValidator.
Or, you can change the env variable value in .env to a valid json like: MYAPP_TOKEN=["Bearer abcdefg123456789"]
and change parse_token to load from a list like:
# in .env file MYAPP_TOKEN=Bearer abcdefg123456789
Because
token
field usesBeforeValidator
,its actual value type in .env file should be
str
(i.e. param type ofparse_token
)but inside
EnvSettingsSource.prepare_field_value
it just concludes that it is a complex type.I think it would be better to consider the input type of the validation function, especially in case of the validator is
BeforeValidator
.Selected Assignee: @hramezani
The text was updated successfully, but these errors were encountered: