Skip to content

Commit f8f633e

Browse files
committed
fix: TT-357 change of an environment variable to a constant
1 parent badbce4 commit f8f633e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

V2/time_tracker/_infrastructure/_config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import typing
22
import os
33

4+
CONNECTION_STRING = 'postgresql://root:root@localhost:5433/timetracker'
5+
46

57
class Config(typing.NamedTuple):
68
DB_CONNECTION_STRING: str
@@ -11,7 +13,7 @@ class Config(typing.NamedTuple):
1113

1214
def load_config():
1315
return Config(
14-
os.environ.get("DB_CONNECTION_STRING"),
16+
CONNECTION_STRING if os.environ.get("DB_CONNECTION_STRING") is None else os.environ.get("DB_CONNECTION_STRING"),
1517
os.environ.get("DB_USER"),
1618
os.environ.get("DB_PASS"),
1719
os.environ.get("DB_NAME")

0 commit comments

Comments
 (0)