summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2013-03-06 16:58:04 +0100
committerClaude Paroz <claude@2xlibre.net>2013-03-06 17:00:46 +0100
commit2add24cc2c605a51695258d45d6d1b61556dec9f (patch)
tree82fb2b3092265c6e3dde4ac7f572fa7c16038ae6
parentb3aa853ec536926c4fd2739c8d39091fe48e51c9 (diff)
One more EMPTY_VALUES replacement following 22be90dd17
Thanks Loic Bistuer for catching this omission. Refs #19989.
-rw-r--r--django/db/models/base.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/django/db/models/base.py b/django/db/models/base.py
index 8eb4048365..543cdfc165 100644
--- a/django/db/models/base.py
+++ b/django/db/models/base.py
@@ -9,7 +9,6 @@ import django.db.models.manager # Imported to register signal handler.
from django.conf import settings
from django.core.exceptions import (ObjectDoesNotExist,
MultipleObjectsReturned, FieldError, ValidationError, NON_FIELD_ERRORS)
-from django.core import validators
from django.db.models.fields import AutoField, FieldDoesNotExist
from django.db.models.fields.related import (ManyToOneRel,
OneToOneField, add_lazy_relation)
@@ -940,7 +939,7 @@ class Model(six.with_metaclass(ModelBase)):
# Skip validation for empty fields with blank=True. The developer
# is responsible for making sure they have a valid value.
raw_value = getattr(self, f.attname)
- if f.blank and raw_value in validators.EMPTY_VALUES:
+ if f.blank and raw_value in f.empty_values:
continue
try:
setattr(self, f.attname, f.clean(raw_value, self))