Get rid of an unneeded flag - destination endpoint is slimmer now and doesnt need it

This commit is contained in:
Pea Tyczynska
2019-04-11 16:33:40 +01:00
parent dd9e285684
commit 2d71aea7a1
2 changed files with 4 additions and 5 deletions

View File

@@ -240,11 +240,10 @@ def preview_letter_template_by_notification_id(service_id, notification_id, file
if overlay:
path = '/precompiled/overlay.{}'.format(file_type)
query_string = '?invert=1'
content = pdf_file
elif file_type == 'png':
path = '/precompiled-preview.png'
query_string = '?hide_notify=true' if page_number == '1' else ''
path = '/precompiled-preview.png' + query_string
else:
path = None
@@ -260,7 +259,7 @@ def preview_letter_template_by_notification_id(service_id, notification_id, file
)
if path:
url = current_app.config['TEMPLATE_PREVIEW_API_HOST'] + path + query_string
url = current_app.config['TEMPLATE_PREVIEW_API_HOST'] + path
response_content = _get_png_preview_or_overlaid_pdf(url, content, notification.id, json=False)
else:
response_content = content