Improve on bare excepts
- And simplify email sending recipient gathering
This commit is contained in:
parent
8cba92b571
commit
4d0801313c
2 changed files with 8 additions and 11 deletions
|
@ -39,5 +39,5 @@ def send_notify_mail(request, new_task):
|
|||
send_mail(
|
||||
email_subject, email_body, new_task.created_by.email,
|
||||
[new_task.assigned_to.email], fail_silently=False)
|
||||
except:
|
||||
except ConnectionRefusedError:
|
||||
messages.error(request, "Task saved but mail not sent. Contact your administrator.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue