Skip to content
Snippets Groups Projects
Unverified Commit 3ee942c5 authored by florimondmanca's avatar florimondmanca
Browse files

Fix bug with SendGrid when DEBUG was empty string

parent 01448b21
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,12 @@ from aws.conf import * ...@@ -6,7 +6,12 @@ from aws.conf import *
from .common import * from .common import *
DEBUG = os.environ.get('DEBUG', False) # NOTE: `or False` ensures the value is `False` (the boolean)
# if the value given in environment is false-y (e.g. empty string)
# Otherwise may lead to unexpected bugs.
# For example, SendGrid could send an empty string as the sandbox mode,
# leading to strange 400 Bad Request errors.
DEBUG = os.environ.get('DEBUG', False) or False
ALLOWED_HOSTS = [ ALLOWED_HOSTS = [
'localhost', 'localhost',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment