diff --git a/drf_compound_fields/fields.py b/drf_compound_fields/fields.py index 72aa92e..0fcebee 100755 --- a/drf_compound_fields/fields.py +++ b/drf_compound_fields/fields.py @@ -190,7 +190,7 @@ def validate(self, value): self.validate_is_dict(value) - if self.value_field: + if self.value_field and value is not None: errors = {} for k, v in six.iteritems(value): try: @@ -204,7 +204,7 @@ def validate(self, value): def run_validators(self, value): super(DictField, self).run_validators(value) - if self.value_field: + if self.value_field and value is not None: errors = {} for k, v in six.iteritems(value): try: diff --git a/setup.py b/setup.py index e21c271..c3d6963 100755 --- a/setup.py +++ b/setup.py @@ -50,7 +50,7 @@ def run(self): setup( name='drf-compound-fields', - version='0.2.2.post2', + version='0.2.2.post3', description='Django-REST-framework serializer fields for compound types.', long_description=readme + '\n\n' + history, author='Steven Cummings',