mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-03 03:50:11 +03:00
Substracted the decimal_places argument and not the string.
This commit is contained in:
parent
8acb06b636
commit
56716f490b
|
@ -865,7 +865,7 @@ class DecimalField(WritableField):
|
|||
self.max_digits, self.decimal_places = max_digits, decimal_places
|
||||
|
||||
if self.decimal_places:
|
||||
self.empty = Decimal('0').quantize(Decimal('.%s1' % ('0' * self.decimal_places - 1)))
|
||||
self.empty = Decimal('0').quantize(Decimal('.%s1' % ('0' * (self.decimal_places - 1))))
|
||||
|
||||
super(DecimalField, self).__init__(*args, **kwargs)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user