Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Better checking if the enable email variable is set

Roland Geiderea750d5783f4
diff --git a/extras/docker/development/settings.py b/extras/docker/development/settings.py
index 9dc67df4f..c7b8dbc8e 100644
--- a/extras/docker/development/settings.py
+++ b/extras/docker/development/settings.py
@@ -72,7 +72,7 @@ SESSION_ENGINE = "django.contrib.sessions.backends.cache"
# Configure a real backend in production
if DEBUG:
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
-if os.environ.get("ENABLE_EMAIL"):
+if env.bool("ENABLE_EMAIL", False):
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = env.str("EMAIL_HOST")
EMAIL_PORT = env.int("EMAIL_PORT")