From 56716f490b0978a7ae17ec4f184998950575b0c0 Mon Sep 17 00:00:00 2001 From: Omer Katz Date: Wed, 12 Feb 2014 22:12:03 +0200 Subject: [PATCH] Substracted the decimal_places argument and not the string. --- rest_framework/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 3c7fcf172..424286015 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -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)