Skip to content

Commit

Permalink
updated init in config to take in .env.local
Browse files Browse the repository at this point in the history
  • Loading branch information
Nargis Sultani committed Aug 15, 2024
1 parent b2e04ba commit 01d5f01
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/regtech_user_fi_management/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_"
Expand All @@ -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
Expand Down

0 comments on commit 01d5f01

Please sign in to comment.