File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 5757
5858# Validate environment configuration on startup
5959# Skip validation during testing or when explicitly disabled
60- if not get_bool ("SKIP_ENV_VALIDATION" , False ) and "test" not in os .environ .get (
60+ if not get_bool ("SKIP_ENV_VALIDATION" , default = False ) and "test" not in os .environ .get (
6161 "DJANGO_SETTINGS_MODULE" , ""
6262):
6363 try :
6464 from main .env_validator import validate_environment_on_startup
6565
6666 validate_environment_on_startup ()
67- except ImportError as e :
68- log .warning (f"Could not import environment validator: { e } " )
69- except Exception as e :
70- log .warning (f"Environment validation failed: { e } " )
67+ except Exception as e : # noqa: BLE001
68+ # We don't want to block if validation fails.
69+ log .warning ("Environment validation failed: %s" , e )
7170
7271BASE_DIR = os .path .dirname ( # noqa: PTH120
7372 os .path .dirname (os .path .abspath (__file__ )) # noqa: PTH100, PTH120
You can’t perform that action at this time.
0 commit comments