              kwargs['allow_null'] = True
          if model_field.validators:
              kwargs['validators'] = model_field.validators
          if getattr(model_field, 'unique', False):
              validator = UniqueValidator(queryset=model_field.model._default_manager)
              kwargs['validators'] = kwargs.get('validators', []) + [validator]
          if to_many and not model_field.blank:
              kwargs['allow_empty'] = False
  
      return kwargs
 
</s> remove         unique_error_message = model_field.error_messages.get('unique', None)
        if unique_error_message:
            unique_error_message = unique_error_message % {
                'model_name': model_field.model._meta.verbose_name,
                'field_label': model_field.verbose_name
            }
 </s> add  </s> remove             message=unique_error_message)
 </s> add             message=get_unique_error_message(model_field))
            validator = UniqueValidator(
                queryset=model_field.model._default_manager,
                message=get_unique_error_message(model_field))
              kwargs['allow_null'] = True
          if model_field.validators:
              kwargs['validators'] = model_field.validators
          if getattr(model_field, 'unique', False):
            validator = UniqueValidator(
                queryset=model_field.model._default_manager,
                message=get_unique_error_message(model_field))
              kwargs['validators'] = kwargs.get('validators', []) + [validator]
          if to_many and not model_field.blank:
              kwargs['allow_empty'] = False
  
      return kwargs
keep keep keep keep replace keep keep keep keep keep
 Respect model error_messages for relation (#7599) 
rest_framework/utils/field_mapping.py