From 219b1e936e257b66401d011224a04bd00d99a79c Mon Sep 17 00:00:00 2001 From: Emanuel Schuetze Date: Mon, 23 Jul 2012 12:35:15 +0200 Subject: [PATCH] Fixed two PDF build errors. --- openslides/application/views.py | 5 ++++- openslides/utils/views.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/openslides/application/views.py b/openslides/application/views.py index 8a7990c66..b8219af27 100644 --- a/openslides/application/views.py +++ b/openslides/application/views.py @@ -749,7 +749,10 @@ class ApplicationPDF(PDFView): cell1b.append(Paragraph("       "+unicode(application.submitter.profile), stylesheet['Small'])) cell1b.append(Spacer(0,0.2*cm)) else: - cell1b.append(Paragraph(unicode(application.submitter.profile), stylesheet['Normal'])) + try: + cell1b.append(Paragraph(unicode(application.submitter.profile), stylesheet['Normal'])) + except Profile.DoesNotExist: + pass # supporters cell2a = [] diff --git a/openslides/utils/views.py b/openslides/utils/views.py index 6329f5462..84d7854bc 100644 --- a/openslides/utils/views.py +++ b/openslides/utils/views.py @@ -267,7 +267,10 @@ class PDFView(PermissionMixin, View): return self.top_space def get_document_title(self): - return unicode(self.document_title) + if self.document_title: + return unicode(self.document_title) + else: + return self.document_title def get_filename(self): return self.filename