Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ucd 36 custom application history page #279

Merged
merged 5 commits into from
Sep 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions request_a_govuk_domain/request/admin/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging

import os

from django.views import View
from django.contrib import admin, messages
Expand Down Expand Up @@ -45,7 +45,12 @@ def post(self, request):
if "_confirm" in request.POST:
try:
# send email
send_approval_or_rejection_email(request)
if os.environ.get("ENVIRONMENT") != "local":
maxf marked this conversation as resolved.
Show resolved Hide resolved
send_approval_or_rejection_email(request)
else:
LOGGER.warning(
"Not sending approval or rejection email as marked as local environment"
)
self._set_application_status(request)
# To show the backend app user a message "[Approval/Rejection] email sent", get the type of
# action ( i.e. whether it is Approval or Rejection )
Expand Down