kolibri/core/serializers.py
def run_validation(self, data=empty):

        """
        We override the default `run_validation`, because the validation
        performed by validators and the `.validate()` method should
        be coerced into an error dictionary with a 'non_fields_error' key.
        """
        (is_empty_value, data) = self.validate_empty_values(data)
        if is_empty_value:
            return data
        try:
            # If we are creating the object (POST) we run the ModelSerializer validation.
            # This reduced validation is executed only when updating (PATCH):
            if self.partial:
                value = self.update_to_internal_value(data)
            else:
                value = self.to_internal_value(data)
        except (ValidationError, DjangoValidationError) as exc:
            raise ValidationError(detail=as_serializer_error(exc))

        return value

        We override the default `run_validation`, because the validation
        performed by validators and the `.validate()` method should
        be coerced into an error dictionary with a 'non_fields_error' key.
        
We override the default `run_validation`, because the validation
performed by validators and the `.validate()` method should
be coerced into an error dictionary with a 'non_fields_error' key.
We override the default ` run_validation ` because the validation performed by validators and the ` . validate () ` method should be coerced into an error dictionary with a ' non_fields_error ' key .
def run_validation(self, data=empty):
        (is_empty_value, data) = self.validate_empty_values(data)
        if is_empty_value:
            return data
        try:
            if self.partial:
                value = self.update_to_internal_value(data)
            else:
                value = self.to_internal_value(data)
        except (ValidationError, DjangoValidationError) as exc:
            raise ValidationError(detail=as_serializer_error(exc))
        return value
def run_validation ( self , data = empty ) : ( is_empty_value , data ) = self . validate_empty_values ( data ) if is_empty_value : return data try : if self . partial : value = self . update_to_internal_value ( data ) else : value = self . to_internal_value ( data ) except ( ValidationError , DjangoValidationError ) as exc : raise ValidationError ( detail = as_serializer_error ( exc ) ) return value
We override the default `run_validation`, because the validation
performed by validators and the `.validate()` method should
be coerced into an error dictionary with a 'non_fields_error' key.
We override the default ` run_validation ` because the validation performed by validators and the ` . validate () ` method should be coerced into an error dictionary with a ' non_fields_error ' key .
"""
        We override the default `run_validation`, because the validation
        performed by validators and the `.validate()` method should
        be coerced into an error dictionary with a 'non_fields_error' key.
        """ # If we are creating the object (POST) we run the ModelSerializer validation. # This reduced validation is executed only when updating (PATCH):
self
data