Change: skip documents with empty content in apply AI suggestions WF (#13985)

This commit is contained in:
shamoon
2026-09-07 21:56:37 +00:00
committed by GitHub
parent f5ff18326d
commit 937feb1bef
3 changed files with 45 additions and 1 deletions
+10
View File
@@ -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