handle scenerio for task after disassociate

This commit is contained in:
jain
2023-09-04 16:49:18 +05:30
parent 116fb00358
commit 9b14eedb18
6 changed files with 17 additions and 9 deletions

View File

@ -689,11 +689,10 @@ class SendSupportEmail(views.APIView):
def post(self, request):
name = request.data.get('name')
sender = request.data.get('email')
subject = request.data.get('subject')
message = request.data.get('message')
if name and sender and subject and message:
if name and sender and message:
try:
send_support_email(name, sender, subject, message)
send_support_email(name, sender, message)
return custom_response(SUCCESS_CODE['3019'], response_status=status.HTTP_200_OK)
except Exception as e:
return custom_error_response(str(e), response_status=status.HTTP_400_BAD_REQUEST)