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
bug in core document.get #26280
Labels
Comments
This was referenced May 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There appears to be a huge bug in the document core get() function.
Practically everywhere in the code (frappe and ERPNext) the assumption is made that doc.get() has the same definition as dict.get(). This is not true.
document.get(key, filters=None, limit=None, default=None)
dict.get(key[, default])
This fails for examples like:
See the following PR that illustrates the issue with the Warnings printed in the test output:
#26279
https://github.com/frappe/frappe/blob/069612366197e4ed98d090d99cc068c8525d09ca/frappe/model/base_document.py#L215C2-L215C61
The text was updated successfully, but these errors were encountered: