From d92638832bb9d70f94b13333c71a0ce434d1f487 Mon Sep 17 00:00:00 2001 From: Fabian Braun Date: Mon, 25 Sep 2023 13:23:47 +0200 Subject: [PATCH] Fix: Copy paste error --- filer/admin/clipboardadmin.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/filer/admin/clipboardadmin.py b/filer/admin/clipboardadmin.py index 6ff9cf427..2db16d8ac 100644 --- a/filer/admin/clipboardadmin.py +++ b/filer/admin/clipboardadmin.py @@ -146,13 +146,12 @@ def ajax_upload(request, folder_id=None): res_x: int = int((FILER_MAX_IMAGE_PIXELS * aspect) ** 0.5) res_y: int = int(res_x / aspect) if pixels > 2 * FILER_MAX_IMAGE_PIXELS: - if pixels > 2 * FILER_MAX_IMAGE_PIXELS: - msg = _( - "Image size (%(pixels)d million pixels) exceeds limit of " - "%(max_pixels)d million pixels by a factor of two or more. Resize " - "image to %(width)d x %(height)d) resolution or lower." - ) % dict(pixels=pixels / 1000000, max_pixels=FILER_MAX_IMAGE_PIXELS / 1000000, - width=res_x, height=res_y) + msg = _( + "Image size (%(pixels)d million pixels) exceeds limit of " + "%(max_pixels)d million pixels by a factor of two or more. Resize " + "image to %(width)d x %(height)d) resolution or lower." + ) % dict(pixels=pixels / 1000000, max_pixels=FILER_MAX_IMAGE_PIXELS / 1000000, + width=res_x, height=res_y) messages.error(request, msg) return JsonResponse({'error': str(msg)})