From df53a5d8c97fe6790f75ed1d9e073b5f614dfc01 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Wed, 13 Apr 2022 18:37:23 +0200 Subject: [PATCH] Prevent none comment while upload pdf documents --- cps/uploader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/uploader.py b/cps/uploader.py index 992d188c..6aa811be 100644 --- a/cps/uploader.py +++ b/cps/uploader.py @@ -231,7 +231,7 @@ def pdf_meta(tmp_file_path, original_file_name, original_file_extension): if title == '': title = doc_info.title if doc_info.title else original_file_name if subject == '': - subject = doc_info.subject + subject = doc_info.subject or "" if tags == '' and '/Keywords' in doc_info: if isinstance(doc_info['/Keywords'], bytes): tags = doc_info['/Keywords'].decode('utf-8')