Skip to content

Commit 60409e2

Browse files
authored
Merge pull request #343 from PeterKharchenko/master
Decimal precision fix
2 parents b220fae + 1c1f3a4 commit 60409e2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: flask_mongoengine/wtf/orm.py

+1
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ def conv_Float(self, model, field, kwargs):
146146
@converts("DecimalField")
147147
def conv_Decimal(self, model, field, kwargs):
148148
self._number_common(model, field, kwargs)
149+
kwargs["places"] = getattr(field, "precision", None)
149150
return f.DecimalField(**kwargs)
150151

151152
@converts("BooleanField")

0 commit comments

Comments
 (0)