Skip to content

Commit 82ba282

Browse files
committed
Updated configuration
1 parent e439e27 commit 82ba282

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

core/macrostrat/core/config.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44

55
from dotenv import load_dotenv
66
from dynaconf import Dynaconf, Validator
7+
from macrostrat.app_frame.control_command import BackendType
8+
from macrostrat.utils import get_logger
79
from pydantic import BaseModel
810
from sqlalchemy.engine import make_url
911
from sqlalchemy.engine.url import URL
1012
from toml import load as load_toml
1113

12-
from macrostrat.app_frame.control_command import BackendType
13-
from macrostrat.utils import get_logger
14-
1514
from .utils import find_macrostrat_config
1615

1716
log = get_logger(__name__)
@@ -99,6 +98,9 @@ def convert_to_string(value):
9998
# A database connection string for PostgreSQL
10099
PG_DATABASE = getattr(settings, "pg_database", None)
101100
url = None
101+
# Not sure why this happens
102+
if PG_DATABASE == "None":
103+
PG_DATABASE = None
102104
# environ.get("MACROSTRAT_PG_DATABASE", None)
103105
if PG_DATABASE is not None:
104106
# On mac and windows, we need to use the docker host `host.docker.internal` or `host.lima.internal`, etc.

0 commit comments

Comments
 (0)