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: