fix(journal-entry): prevent submit failure due to double background queuing (backport #52083) (#52086)

Co-authored-by: V Shankar <shankarv292002@gmail.com>
fix(journal-entry): prevent submit failure due to double background queuing (#52083)
This commit is contained in:
mergify[bot]
2026-01-27 05:52:23 +00:00
committed by GitHub
parent c4b135e1a2
commit 72a9b58b14

View File

@@ -172,7 +172,7 @@ class JournalEntry(AccountsController):
validate_docs_for_deferred_accounting([self.name], [])
def submit(self):
if len(self.accounts) > 100:
if len(self.accounts) > 100 and not self.meta.queue_in_background:
queue_submission(self, "_submit")
else:
return self._submit()