mirror of https://github.com/django/django.git
Fixed #275 -- Bug in validators.RequiredIfOtherFieldsGiven. Thanks, jhernandez
git-svn-id: http://code.djangoproject.com/svn/django/trunk@410 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
0b9330b085
commit
888cf1f889
|
@ -237,7 +237,7 @@ class RequiredIfOtherFieldsGiven:
|
|||
|
||||
def __call__(self, field_data, all_data):
|
||||
for field in self.other:
|
||||
if all_data.get(field) and not field_data:
|
||||
if all_data.get(field, False) and not field_data:
|
||||
raise ValidationError, self.error_message
|
||||
|
||||
class RequiredIfOtherFieldGiven(RequiredIfOtherFieldsGiven):
|
||||
|
|
Loading…
Reference in New Issue