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(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 = []

View File

@ -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