mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-12 10:34:17 +00:00
fix(): AttributeError: 'NoneType' object has no attribute 'startswith'
This commit is contained in:
parent
998e08ee6e
commit
84a47e0efd
@ -18,7 +18,7 @@ def config_from_env(variable_name: str, *, default: str | bool | int | None = No
|
||||
# using docker secrets - put file contents to env value
|
||||
if variable_name.endswith("_FILE"):
|
||||
value_from_file = default if value_from_env is None else value_from_env
|
||||
if value_from_file.startswith("/run/secrets"):
|
||||
if value_from_file and value_from_file.startswith("/run/secrets"):
|
||||
# rewrite variable name: remove _FILE
|
||||
variable_name = variable_name.removesuffix("_FILE")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user