Permalink
Browse files

Fixed field deconstruction tests failures introduced by 1506c71.

refs #12030.
  • Loading branch information...
1 parent 42336c8 commit ff874f363ce6556577f03909b15c71c051d5b617 @charettes charettes committed with timgraham Mar 25, 2014
Showing with 4 additions and 3 deletions.
  1. +4 −3 django/db/models/fields/__init__.py
View
7 django/db/models/fields/__init__.py
@@ -1562,13 +1562,14 @@ class IntegerField(Field):
description = _("Integer")
def __init__(self, *args, **kwargs):
- field_validators = kwargs.setdefault('validators', [])
+ default_validators = self.default_validators[:]
internal_type = self.get_internal_type()
min_value, max_value = connection.ops.integer_field_range(internal_type)
if min_value is not None:
- field_validators.append(validators.MinValueValidator(min_value))
+ default_validators.append(validators.MinValueValidator(min_value))
if max_value is not None:
- field_validators.append(validators.MaxValueValidator(max_value))
+ default_validators.append(validators.MaxValueValidator(max_value))
+ self.default_validators = default_validators
super(IntegerField, self).__init__(*args, **kwargs)
def get_prep_value(self, value):

0 comments on commit ff874f3

Please sign in to comment.