send email to manager if coop has no email
This commit is contained in:
@@ -290,7 +290,7 @@ def purchase_email(request):
|
||||
return Response({"error": "Invalid value for product"}, status=status.HTTP_406_NOT_ACCEPTABLE)
|
||||
# check company.email
|
||||
if company.email is None:
|
||||
return Response({"error": "Related compay has no contact email address"}, status=status.HTTP_406_NOT_ACCEPTABLE)
|
||||
company.email = managing_user.email
|
||||
try:
|
||||
# send email to company
|
||||
company_message = render_to_string('purchase_notification_v2.html', {
|
||||
|
||||
Reference in New Issue
Block a user