diff options
| author | Baptiste Mispelon <bmispelon@gmail.com> | 2014-03-14 17:20:31 +0100 |
|---|---|---|
| committer | Baptiste Mispelon <bmispelon@gmail.com> | 2014-03-14 17:21:59 +0100 |
| commit | 37f7f233f5f30c28ea60a7fbc272ffd296e2dbe1 (patch) | |
| tree | 2bbed9d0853ff6b19dccdd129dc593d417524543 /django/db | |
| parent | 666a2ad22ff868c214bf251d1171148d943cfc82 (diff) | |
Fixed #22272 -- Fixed regression in DecimalField when using decimal_places=0.
Thanks to trac user merb for the report.
Diffstat (limited to 'django/db')
| -rw-r--r-- | django/db/models/fields/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index 16a07002bc..dd88471d78 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -1379,9 +1379,9 @@ class DecimalField(Field): def deconstruct(self): name, path, args, kwargs = super(DecimalField, self).deconstruct() - if self.max_digits: + if self.max_digits is not None: kwargs['max_digits'] = self.max_digits - if self.decimal_places: + if self.decimal_places is not None: kwargs['decimal_places'] = self.decimal_places return name, path, args, kwargs |
