From af32f7180c4e21e11cbb6e9d2ab6779c1da62586 Mon Sep 17 00:00:00 2001 From: Dmitry Novikov Date: Wed, 19 Sep 2018 13:27:25 +0300 Subject: [PATCH] FIX: process when task author not attached --- abonapp/locale/ru/LC_MESSAGES/django.po | 3 +++ abonapp/templates/abonapp/task_log.html | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/abonapp/locale/ru/LC_MESSAGES/django.po b/abonapp/locale/ru/LC_MESSAGES/django.po index cc058bc..4762a45 100644 --- a/abonapp/locale/ru/LC_MESSAGES/django.po +++ b/abonapp/locale/ru/LC_MESSAGES/django.po @@ -1156,3 +1156,6 @@ msgstr "Открыть" msgid "Auto continue service." msgstr "Автопродление услуги." + +msgid "No author attached" +msgstr "Автор не назначен" diff --git a/abonapp/templates/abonapp/task_log.html b/abonapp/templates/abonapp/task_log.html index b2be1c6..e6a47be 100644 --- a/abonapp/templates/abonapp/task_log.html +++ b/abonapp/templates/abonapp/task_log.html @@ -20,7 +20,13 @@ - {{ task.author.get_short_name }} + + {% if task.author %} + {{ task.author.get_short_name }} + {% else %} + {% trans 'No author attached' %} + {% endif %} + {% for rec in task.recipients.all %} {{ rec.get_short_name }}