Added rounding for unicode return value of to_mongo in DecimalField. Closes #1103

This commit is contained in:
Дмитрий Янцен
2016-12-06 10:42:10 +05:00
parent 25e0f12976
commit 7ce8768c19
3 changed files with 3 additions and 1 deletions

View File

@@ -341,7 +341,7 @@ class DecimalField(BaseField):
if value is None:
return value
if self.force_string:
return unicode(value)
return unicode(self.to_python(value))
return float(self.to_python(value))
def validate(self, value):