From 674b4a839cc77922c6ec079c7b7d8c4551826554 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 19 Aug 2024 19:38:40 -0700 Subject: [PATCH] Fix: respect deskew / rotate pages from AppConfig if set (#7501) --- src/paperless/config.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/paperless/config.py b/src/paperless/config.py index 4195a16db..00afb2a13 100644 --- a/src/paperless/config.py +++ b/src/paperless/config.py @@ -70,8 +70,14 @@ class OcrConfig(OutputTypeConfig): ) self.image_dpi = app_config.image_dpi or settings.OCR_IMAGE_DPI self.clean = app_config.unpaper_clean or settings.OCR_CLEAN - self.deskew = app_config.deskew or settings.OCR_DESKEW - self.rotate = app_config.rotate_pages or settings.OCR_ROTATE_PAGES + self.deskew = ( + app_config.deskew if app_config.deskew is not None else settings.OCR_DESKEW + ) + self.rotate = ( + app_config.rotate_pages + if app_config.rotate_pages is not None + else settings.OCR_ROTATE_PAGES + ) self.rotate_threshold = ( app_config.rotate_pages_threshold or settings.OCR_ROTATE_PAGES_THRESHOLD )