Fixed two PDF build errors.

This commit is contained in:
Emanuel Schuetze 2012-07-23 12:35:15 +02:00
parent 9d2a011958
commit 219b1e936e
2 changed files with 8 additions and 2 deletions

View File

@ -749,7 +749,10 @@ class ApplicationPDF(PDFView):
cell1b.append(Paragraph("       "+unicode(application.submitter.profile), stylesheet['Small'])) cell1b.append(Paragraph("       "+unicode(application.submitter.profile), stylesheet['Small']))
cell1b.append(Spacer(0,0.2*cm)) cell1b.append(Spacer(0,0.2*cm))
else: else:
try:
cell1b.append(Paragraph(unicode(application.submitter.profile), stylesheet['Normal'])) cell1b.append(Paragraph(unicode(application.submitter.profile), stylesheet['Normal']))
except Profile.DoesNotExist:
pass
# supporters # supporters
cell2a = [] cell2a = []

View File

@ -267,7 +267,10 @@ class PDFView(PermissionMixin, View):
return self.top_space return self.top_space
def get_document_title(self): def get_document_title(self):
if self.document_title:
return unicode(self.document_title) return unicode(self.document_title)
else:
return self.document_title
def get_filename(self): def get_filename(self):
return self.filename return self.filename