Skip to content

Commit d883481

Browse files
committed
Remove ENABLE_EMAIL .env variable
1 parent 5fe98c3 commit d883481

3 files changed

Lines changed: 3 additions & 8 deletions

File tree

.env.example

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,4 @@ DATABASE_NAME=
1212
DATABASE_USER=
1313
DATABASE_PASSWORD=
1414
DATABASE_HOST=
15-
DATABASE_PORT=
16-
17-
ENABLE_EMAIL=
15+
DATABASE_PORT=

procollab/settings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
SECRET_KEY = config("DJANGO_SECRET_KEY", default="django-default-secret-key", cast=str)
1616

1717
DEBUG = config("DEBUG", default=False, cast=bool)
18-
ENABLE_EMAIL = config("ENABLE_EMAIL", default=False, cast=bool)
1918

2019
SENTRY_DSN = config("SENTRY_DSN", default="", cast=str)
2120

users/views.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ def post(self, request, *args, **kwargs):
6464
"to_email": user.email,
6565
}
6666

67-
if settings.ENABLE_EMAIL:
68-
Email.send_email(data)
67+
Email.send_email(data)
6968

7069
return Response(serializer.data, status=status.HTTP_201_CREATED, headers=headers)
7170

@@ -136,8 +135,7 @@ def post(self, request, *args, **kwargs):
136135
"to_email": user.email,
137136
}
138137

139-
if settings.ENABLE_EMAIL:
140-
Email.send_email(data)
138+
Email.send_email(data)
141139

142140
return Response(serializer.data, status=status.HTTP_201_CREATED)
143141

0 commit comments

Comments
 (0)