Bug if important objects serializers and not required field
Closed this issue · 1 comments
nxexox commented
from rest_framework import serializers
class A(serializers.Serializer):
c = serializers.CharField()
class B(serializers.Serializer):
a = A(required=False)
B(data={}).is_valid(raise_exception=True) # raise Validation error
B(data={'a': None}).is_valid(raise_exception=True) # raise Validation error
B(data={'a': {}}) # not raise