Skip to content

Commit

Permalink
Skip dotenv if not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
mrharpo committed Oct 3, 2024
1 parent be506bf commit 0f91207
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions organ/config.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
from os import environ

from dotenv import load_dotenv
try:
from dotenv import load_dotenv

load_dotenv()
except ImportError:
pass

load_dotenv()

ENVIRONMENT = environ.get('ENVIRONMENT', 'development')
DB_URL = environ.get('DB_URL', 'postgresql://postgres:postgres@localhost:5432/organ')
Expand Down

0 comments on commit 0f91207

Please sign in to comment.