Closed
Description
Wtform's DecimalField "places" attribute defaults to 2, disregarding mongoengine's DecimalField "precision" attribute.
One of the negative scenarios - if the document is edited by user using wtform (say, some other field is edited), decimal value is rounded to 2 places and data is lost.
Solved it by replacing
return f.DecimalField(**kwargs)
with
return f.DecimalField(places=getattr(field, 'precision', None),**kwargs)
in wtf/orm.py, line 148