diff --git a/src/regtech_user_fi_management/config.py b/src/regtech_user_fi_management/config.py index fac386a..3cf2cc1 100644 --- a/src/regtech_user_fi_management/config.py +++ b/src/regtech_user_fi_management/config.py @@ -8,6 +8,7 @@ from regtech_api_commons.oauth2.config import KeycloakSettings from regtech_regex.regex_config import RegexConfigs +from pydantic_settings.sources import DotenvType, ENV_FILE_SENTINEL JWT_OPTS_PREFIX = "jwt_opts_" @@ -28,8 +29,8 @@ class Settings(BaseSettings): admin_scopes: Set[str] = set(["query-groups", "manage-users"]) db_logging: bool = True - def __init__(self, **data): - super().__init__(**data) + def __init__(self, _env_file: DotenvType | None = ENV_FILE_SENTINEL, **data): + super().__init__(_env_file=_env_file, **data) @field_validator("inst_conn", mode="before") @classmethod