From ff874f363ce6556577f03909b15c71c051d5b617 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Tue, 25 Mar 2014 16:02:53 -0400 Subject: [PATCH] Fixed field deconstruction tests failures introduced by 1506c71a95. refs #12030. --- django/db/models/fields/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index 4ebb6049b3..268a0bcab8 100644 --- a/django/db/models/fields/__init__.py +++ b/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):