Skip to content

Commit

Permalink
One more EMPTY_VALUES replacement following 22be90d
Browse files Browse the repository at this point in the history
Thanks Loic Bistuer for catching this omission. Refs #19989.
  • Loading branch information
claudep committed Mar 6, 2013
1 parent b3aa853 commit 2add24c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions django/db/models/base.py
Expand Up @@ -9,7 +9,6 @@
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)
Expand Down Expand Up @@ -940,7 +939,7 @@ def clean_fields(self, exclude=None):
# 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))
Expand Down

0 comments on commit 2add24c

Please sign in to comment.