From e4367051df4891b9f4a4a3327fad1c62115eab5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Fri, 6 Jul 2012 15:30:14 +0200 Subject: [PATCH] Hide "Reason" in Application PDF if there is none. --- openslides/application/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openslides/application/views.py b/openslides/application/views.py index b731704c6..2879f374e 100644 --- a/openslides/application/views.py +++ b/openslides/application/views.py @@ -828,8 +828,9 @@ class ApplicationPDF(PDFView): # text story.append(Paragraph("%s" % application.public_version.text.replace('\r\n','
'), stylesheet['Paragraph'])) # reason - story.append(Paragraph(_("Reason")+":", stylesheet['Heading3'])) - story.append(Paragraph("%s" % application.public_version.reason.replace('\r\n','
'), stylesheet['Paragraph'])) + if application.public_version.reason: + story.append(Paragraph(_("Reason")+":", stylesheet['Heading3'])) + story.append(Paragraph("%s" % application.public_version.reason.replace('\r\n','
'), stylesheet['Paragraph'])) return story