make it work with bare bool as well
This commit is contained in:
parent
274da16676
commit
c74e8b97bc
@ -300,7 +300,9 @@ class Config(Base):
|
|||||||
|
|
||||||
# Convert the env var to the expected type.
|
# Convert the env var to the expected type.
|
||||||
try:
|
try:
|
||||||
if issubclass(field.type_, type) and issubclass(field.type_, bool):
|
if field.type_ == bool or (
|
||||||
|
issubclass(field.type_, type) and issubclass(field.type_, bool)
|
||||||
|
):
|
||||||
# special handling for bool values
|
# special handling for bool values
|
||||||
env_var = env_var.lower() in ["true", "1", "yes"]
|
env_var = env_var.lower() in ["true", "1", "yes"]
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user