mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-27 01:58:55 +00:00
Change: skip documents with empty content in apply AI suggestions WF (#13985)
This commit is contained in:
1 parent
f5ff18326d
commit
937feb1bef
3 files changed
+45
-1
No files matched your search
@@ -138,6 +138,16 @@ def apply_ai_suggestions_to_document(
|
||||
)
|
||||
return []
|
||||
|
||||
if not document.content.strip():
|
||||
logger.warning(
|
||||
"Document %s has no content, skipping AI suggestions for workflow "
|
||||
"action %s",
|
||||
document.pk,
|
||||
action.pk,
|
||||
extra={"group": logging_group},
|
||||
)
|
||||
return []
|
||||
|
||||
# Workflows run without a user, so we use the document owner
|
||||
owner = document.owner
|
||||
|
||||
|
||||
Reference in new issue
Block a user