Dmitry Novikov 7 years ago
parent
commit
5243fda0e6
  1. 4
      taskapp/handle.py

4
taskapp/handle.py

@ -23,7 +23,7 @@ def handle(task, author, recipients):
task_status = _('Task')
# If task completed or failed
if task.state == 'F' or task.state == 'C':
if task.state in ('F', 'C'):
task_status = _('Task completed')
fulltext = render_to_string('taskapp/notification.html', {
@ -33,7 +33,7 @@ def handle(task, author, recipients):
})
try:
if task.state == 'F' or task.state == 'C':
if task.state in ('F', 'C'):
# If task completed or failed than send one message to author
send_email_notify.delay(fulltext, author.pk)
send_viber_message.delay(None, author.pk, fulltext)

Loading…
Cancel
Save