Skip to content

Commit 44b3733

Browse files
committed
Fix issue with CONN_MAX_AGE
1 parent fe7e76e commit 44b3733

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tilavarauspalvelu/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# ruff: noqa: N802
2+
import os
23
import zoneinfo
34
from pathlib import Path
45

@@ -135,8 +136,7 @@ def APP_VERSION(cls) -> str:
135136

136137
# --- Database settings ------------------------------------------------------------------------------------------
137138

138-
CONN_MAX_AGE = values.IntegerValue(default=0)
139-
DATABASES = values.DatabaseURLValue(conn_max_age=CONN_MAX_AGE)
139+
DATABASES = values.DatabaseURLValue(conn_max_age=int(os.getenv("CONN_MAX_AGE", "0")))
140140

141141
# --- Template settings ------------------------------------------------------------------------------------------
142142

0 commit comments

Comments
 (0)