fix: avoid exceptions when the width of the thumbnail is not an int

pull/730/head
Raphaël Vinot 2023-06-26 15:26:41 +02:00
parent 19fae16c9c
commit ff4faa8ec1
1 changed files with 1 additions and 1 deletions

View File

@ -535,7 +535,7 @@ def redirects(tree_uuid: str):
@file_response
def image(tree_uuid: str):
max_width = request.args.get('width')
if max_width:
if max_width and max_width.isdigit():
to_return = lookyloo.get_screenshot_thumbnail(tree_uuid, width=int(max_width))
else:
to_return = lookyloo.get_screenshot(tree_uuid)