From 6bd5c34b5445c3279ab20419d3afe3c3cb9a9b1b Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 25 Feb 2024 17:45:35 -0800 Subject: [PATCH] Fix: handle title placeholder for docs without original_filename (#5828) --- src/documents/signals/handlers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/documents/signals/handlers.py b/src/documents/signals/handlers.py index 9f2b9a222..b8067df86 100644 --- a/src/documents/signals/handlers.py +++ b/src/documents/signals/handlers.py @@ -575,7 +575,11 @@ def run_workflow( else "" ), timezone.localtime(document.added), - document.original_filename, + ( + document.original_filename + if document.original_filename is not None + else "" + ), timezone.localtime(document.created), ) except Exception: