fix config bool check in python3.13

This commit is contained in:
Benedikt Bartscher 2024-10-20 17:52:20 +02:00
parent 6cb87a812f
commit 274da16676
No known key found for this signature in database

View File

@ -300,7 +300,7 @@ 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_, bool): if 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: