Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: TT-357 change of an environment variable to a constant
  • Loading branch information
ararcos committed Nov 12, 2021
commit f8f633e487b5523e7f4affca1b498e1abf0b79b8
4 changes: 3 additions & 1 deletion V2/time_tracker/_infrastructure/_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import typing
import os

CONNECTION_STRING = 'postgresql://root:root@localhost:5433/timetracker'


class Config(typing.NamedTuple):
DB_CONNECTION_STRING: str
Expand All @@ -11,7 +13,7 @@ class Config(typing.NamedTuple):

def load_config():
return Config(
os.environ.get("DB_CONNECTION_STRING"),
CONNECTION_STRING if os.environ.get("DB_CONNECTION_STRING") is None else os.environ.get("DB_CONNECTION_STRING"),
os.environ.get("DB_USER"),
os.environ.get("DB_PASS"),
os.environ.get("DB_NAME")
Expand Down