diff --git a/src/documents/consumer.py b/src/documents/consumer.py index 3a28abb6c..1d973ce8b 100644 --- a/src/documents/consumer.py +++ b/src/documents/consumer.py @@ -832,6 +832,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) @@ -845,9 +846,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: