-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
DecimalField.quantize() fails when using cdecimal if rounding parameter is not specified #6105
Closed
5 of 6 tasks
Comments
I'm closing this for now per #5741 (comment), as we generally don't consider this an issue. However, I am leaving the PR open for consideration. |
kbussell
added a commit
to enefeq/django-rest-framework
that referenced
this issue
Aug 7, 2018
kbussell
added a commit
to enefeq/django-rest-framework
that referenced
this issue
Aug 7, 2018
kbussell
added a commit
to enefeq/django-rest-framework
that referenced
this issue
Aug 7, 2018
kbussell
added a commit
to enefeq/django-rest-framework
that referenced
this issue
Aug 7, 2018
kbussell
added a commit
to enefeq/django-rest-framework
that referenced
this issue
Aug 7, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checklist
master
branch of Django REST framework.Coming up with a test case to run as part of the test suite is tough because the
decimal
module needs to be monkey-patched withcdecimal
early in the flow. I realize this isn't necessarily a common case, but the fix (coming soon in a pr) is straightforward.Steps to reproduce
Expected behavior
I would expect that one does not need to specify the rounding parameter in the field declaration for it to work.
Actual behavior
Without specifying the rounding parameter explicitly, calls to
DecimalField.quantize()
will fail with aTypeError
because therounding
parameter is expected to be an integer (and defaults toNone
in the code).The text was updated successfully, but these errors were encountered: