Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed field deconstruction tests failures introduced by 1506c71.

refs #12030.
  • Loading branch information...
commit ff874f363ce6556577f03909b15c71c051d5b617 1 parent 42336c8
@charettes charettes authored timgraham committed
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):
Please sign in to comment.
Something went wrong with that request. Please try again.