Changes between Initial Version and Version 1 of Ticket #16881
- Timestamp:
- Sep 22, 2011, 8:13:55 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #16881 – Description
initial v1 1 We see the error "quantize result has too many digits for current context" when using a DecimalField with max_digits=7 decimal_places=2 ie the following call fails1 We see the error "quantize result has too many digits for current context" when using a !DecimalField with max_digits=7 decimal_places=2 ie the following call fails 2 2 3 {{{ 3 4 format_number(Decimal('914123.22'), 7, 2) 4 5 }}} 5 6 I believe this is due to the statement 6 7 {{{ 7 8 context.prec = max_digits 8 9 }}} 9 10 whereas I think it should be 10 11 context.prec = max_digits +decimal_places12 11 {{{ 12 context.prec = max_digits + decimal_places 13 }}} 13 14 but I am not sure.