          if data is None:
              if not self.allow_null:
                  self.fail('null')
              return (True, None)
  
          return (False, data)
  
 
</s> remove         self.Serializer = TestSerializer
 </s> add         # nullable nested serializer testing
        class NullableNestedSerializer(serializers.Serializer):
            nested = NestedSerializer1(source='*', allow_null=True)

        # nullable custom field testing
        class CustomField(serializers.Field):
            def to_representation(self, instance):
                return getattr(instance, 'foo', None)

            def to_internal_value(self, data):
                return {'foo': data}

        class NullableFieldSerializer(serializers.Serializer):
            field = CustomField(source='*', allow_null=True)

        self.Serializer = NestedBaseSerializer
        self.NullableNestedSerializer = NullableNestedSerializer
        self.NullableFieldSerializer = NullableFieldSerializer </s> remove         class TestSerializer(serializers.Serializer):
 </s> add         class NestedBaseSerializer(serializers.Serializer): </s> remove     Tests for `source='*'` argument, which is used for nested representations.
 </s> add     Tests for `source='*'` argument, which is often used for complex field or
    nested representations.
            # Nullable `source='*'` fields should not be skipped when its named
            # field is given a null value. This is because `source='*'` means
            # the field is passed the entire object, which is not null.
            elif self.source == '*':
                return (False, None)
          if data is None:
              if not self.allow_null:
                  self.fail('null')
            # Nullable `source='*'` fields should not be skipped when its named
            # field is given a null value. This is because `source='*'` means
            # the field is passed the entire object, which is not null.
            elif self.source == '*':
                return (False, None)
              return (True, None)
  
          return (False, data)
  
keep keep add keep keep keep keep
 Fix nullable `source='*'` fields (#6659) 
rest_framework/fields.py