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

perf: asset creation from purchase receipt (backport #42824) #42828

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 20, 2024

The function get_item_details was originally using frappe.get_doc("Asset Category", asset_category) to retrieve the "Asset Category" document. This method retrieves the document from the database every time it is called, which was a time-consuming operation.
Fix: The fix was to replace frappe.get_doc("Asset Category", asset_category) with frappe.get_cached_doc("Asset Category", asset_category)

Screenshot 2024-08-20 at 12 01 17 PM Screenshot 2024-08-20 at 12 02 45 PM
This is an automatic backport of pull request #42824 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from deepeshgarg007 as a code owner August 20, 2024 08:12
@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Aug 20, 2024
@khushi8112 khushi8112 merged commit 21e5c01 into version-15-hotfix Aug 20, 2024
12 checks passed
@khushi8112 khushi8112 deleted the mergify/bp/version-15-hotfix/pr-42824 branch August 20, 2024 09:47
@frappe-pr-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 15.33.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-tests This PR needs automated unit-tests. released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants