From eb1a1fbf447bf84b7b63e37dfbe6047fd51f00ea Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Wed, 4 Nov 2026 20:09:45 -0800 Subject: [PATCH] Fix: refresh the document after placing files, before the post-consume script --- src/documents/consumer.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/documents/consumer.py b/src/documents/consumer.py index 555a02db48..a181bea3e9 100644 --- a/src/documents/consumer.py +++ b/src/documents/consumer.py @@ -813,6 +813,7 @@ class ConsumerPlugin( # The storage scope above nests under the consume task's scope, so its # moves are still pending; place the file before the script reads its path. flush_pending_file_moves() + document.refresh_from_db() self.run_post_consume_script(document) @@ -826,9 +827,6 @@ class ConsumerPlugin( document.id, ) - # Return the most up to date fields - document.refresh_from_db() - return ConsumeFileSuccessResult(document_id=document.pk) def _parse_title_placeholders(self, title: str) -> str: