Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Enqueue action after commit #25318

Merged
merged 1 commit into from
Mar 11, 2024
Merged

Conversation

ankush
Copy link
Member

@ankush ankush commented Mar 11, 2024

sentry FRAPPE-3HS

What's happening:

  • Salary slip is submitting JV which is enqueued immediately
  • JV doesn't exist yet as transaction isn't commited
DoesNotExistError: Journal Entry JV/23-24-00444 not found
  File "frappe/utils/background_jobs.py", line 218, in execute_job
    retval = method(**kwargs)
  File "frappe/model/document.py", line 1655, in execute_action
    doc = frappe.get_doc(__doctype, __name)
  File "__init__.py", line 1363, in get_doc
    doc = frappe.model.document.get_doc(*args, **kwargs)
  File "frappe/model/document.py", line 85, in get_doc
    return controller(*args, **kwargs)
  File "erpnext/accounts/doctype/journal_entry/journal_entry.py", line 111, in __init__
    super(JournalEntry, self).__init__(*args, **kwargs)
  File "erpnext/controllers/accounts_controller.py", line 96, in __init__
    super(AccountsController, self).__init__(*args, **kwargs)
  File "frappe/model/document.py", line 126, in __init__
    self.load_from_db()
  File "frappe/model/document.py", line 172, in load_from_db
    frappe.throw(
  File "__init__.py", line 677, in throw
    msgprint(
  File "__init__.py", line 642, in msgprint
    _raise_exception()
  File "__init__.py", line 593, in _raise_exception
    raise exc

@ankush ankush requested review from a team and akhilnarang and removed request for a team March 11, 2024 07:41
@github-actions github-actions bot added the add-test-cases Add test case to validate fix or enhancement label Mar 11, 2024
@ankush ankush enabled auto-merge March 11, 2024 07:51
@ankush ankush added backport version-14-hotfix backport to version 14 backport version-15-hotfix Backport the PR to v15 labels Mar 11, 2024
@ankush ankush removed the add-test-cases Add test case to validate fix or enhancement label Mar 11, 2024
@ankush ankush merged commit dc531ab into frappe:develop Mar 11, 2024
23 checks passed
@ankush ankush deleted the enq_after_commit branch March 11, 2024 09:02
ankush added a commit that referenced this pull request Mar 11, 2024
…-25318

fix: Enqueue action after commit (backport #25318)
ankush added a commit that referenced this pull request Mar 11, 2024
…-25318

fix: Enqueue action after commit (backport #25318)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14 backport version-15-hotfix Backport the PR to v15
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant