Skip to content

Commit

Permalink
main: pdf text encoding on licence_type.name
Browse files Browse the repository at this point in the history
  • Loading branch information
dbca-asi committed Jan 11, 2017
1 parent f7d943d commit 339ceee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wildlifelicensing/apps/main/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ def _create_licence(licence_buffer, licence, application, site_url, original_iss

# cannot use licence get_title_with_variants because licence isn't saved yet so can't get variants
if application.variants.exists():
title = '{} ({})'.format(application.licence_type.name, ' / '.join(application.variants.all().
title = '{} ({})'.format(application.licence_type.name.encode('UTF-8'), ' / '.join(application.variants.all().
values_list('name', flat=True)))
else:
title = licence.licence_type.name
title = licence.licence_type.name.encode('UTF-8')

elements.append(Paragraph(title, styles['InfoTitleVeryLargeCenter']))
elements.append(Paragraph(licence.licence_type.statement, styles['InfoTitleLargeLeft']))
Expand Down Expand Up @@ -440,7 +440,7 @@ def _create_cover_letter(cover_letter_buffer, licence, site_url):

elements.append(Spacer(1, LETTER_ADDRESS_BUFFER_HEIGHT))

elements += _create_letter_paragraph('{}'.format(licence.licence_type.name), style='LetterBoldLeft')
elements += _create_letter_paragraph('{}'.format(licence.licence_type.name.encode('UTF-8')), style='LetterBoldLeft')

elements += _create_letter_paragraph('Please find the licence attached.')

Expand Down Expand Up @@ -473,7 +473,7 @@ def _create_licence_renewal_elements(licence):

licence_renewal_elements += _create_letter_paragraph('This is a reminder that your licence:')

licence_renewal_elements += _create_letter_paragraph('{} <{}>'.format(licence.licence_type.name,
licence_renewal_elements += _create_letter_paragraph('{} <{}>'.format(licence.licence_type.name.encode('UTF-8'),
licence.reference),
style='LetterBoldLeft')

Expand Down

0 comments on commit 339ceee

Please sign in to comment.