Commits

James Crasta committed a5d05f5

Resolve test failure with python 3.3 in Decimal. Fixes #117.

Comments (0)

Files changed (3)

 - Ali Aafshar
 - Andreas Madsack
 - Christopher Grebs
+- Dima Moroz
 - Eduardo Schettino
 - Emil Vladev
+- Harro van der Klauw
 - Jean-Philippe Serafin
 - Rodrigo Moraes
 - Sebastian Wiesner
 WTForms Changelog
 =================
 
+Version 1.0.3
+-------------
+Not yet released.
+
+- Tests complete in python 3.3.
+- Localization for ru.
+- Minor fixes in documentation for clarity.
+- ext.sqlalchemy model_form: Fix issue in ColumnDefault conversion
+
 Version 1.0.2
 -------------
 Released August 24, 2012

wtforms/fields/core.py

             if self.places is not None:
                 if hasattr(self.data, 'quantize'):
                     exp = decimal.Decimal('.1') ** self.places
-                    quantized = self.data.quantize(exp, rounding=self.rounding)
+                    if self.rounding is None:
+                        quantized = self.data.quantize(exp)
+                    else:
+                        quantized = self.data.quantize(exp, rounding=self.rounding)
                     return text_type(quantized)
                 else:
                     # If for some reason, data is a float or int, then format