Skip to content

Commit cebd53e

Browse files
authored
fix loading database urls (#117)
1 parent d4fba66 commit cebd53e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sensorsafrica/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@
110110
"postgres://sensorsafrica:sensorsafrica@localhost:5432/sensorsafrica",
111111
)
112112

113-
READ_DATABASE_URLS = os.getenv("SENSORSAFRICA_READ_DATABASE_URLS", DATABASE_URL).split(" ")
113+
READ_DATABASE_URLS = os.getenv("SENSORSAFRICA_READ_DATABASE_URLS", DATABASE_URL).split(",")
114114

115115
DATABASES = {"default": dj_database_url.parse(DATABASE_URL), }
116116

117-
for index, read_database_url in enumerate(1, READ_DATABASE_URLS):
117+
for index, read_database_url in enumerate(READ_DATABASE_URLS,start=1):
118118
DATABASES[f"read_replica_{index}"] = dj_database_url.parse(read_database_url)
119119

120120
DATABASE_ROUTERS = ["sensorsafrica.router.ReplicaRouter", ]

0 commit comments

Comments
 (0)