mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix(encryption): resolve SECRET_KEY lazily to fix silent re-encrypt-secrets failures (#37982)
This commit is contained in:
@@ -54,7 +54,7 @@ class SQLAlchemyUtilsAdapter( # pylint: disable=too-few-public-methods
|
||||
**kwargs: Optional[dict[str, Any]],
|
||||
) -> TypeDecorator:
|
||||
if app_config:
|
||||
return EncryptedType(*args, app_config["SECRET_KEY"], **kwargs)
|
||||
return EncryptedType(*args, lambda: app_config["SECRET_KEY"], **kwargs)
|
||||
|
||||
raise Exception( # pylint: disable=broad-exception-raised
|
||||
"Missing app_config kwarg"
|
||||
|
||||
Reference in New Issue
Block a user