Stupidly referenced an attribute that will not always be populated. Replaced with a call to getattr with a default None value

This commit is contained in:
Jarrod Baumann 2014-11-04 13:15:17 -06:00
parent 5fc253d886
commit 026f164f7a

View File

@ -290,7 +290,7 @@ class Field(object):
if data is empty:
if getattr(self.root, 'partial', False):
raise SkipField()
if self.required and not self.allow_blank:
if self.required and not getattr(self, 'allow_blank', None):
self.fail('required')
return self.get_default()