              (postgres_fields and isinstance(model_field, postgres_fields.JSONField)) or \
              (hasattr(models, 'JSONField') and isinstance(model_field, models.JSONField)):
          kwargs['style'] = {'base_template': 'textarea.html'}
  
      if isinstance(model_field, models.AutoField) or not model_field.editable:
          # If this field is read-only, then return early.
          # Further keyword arguments are not valid.
          kwargs['read_only'] = True
          return kwargs
  
 
</s> remove         if model_field.null:
            kwargs['allow_null'] = True
 </s> add  </s> remove     if model_field.null:
        kwargs['allow_null'] = True

 </s> add 
    if model_field.null:
        kwargs['allow_null'] = True

              (postgres_fields and isinstance(model_field, postgres_fields.JSONField)) or \
              (hasattr(models, 'JSONField') and isinstance(model_field, models.JSONField)):
          kwargs['style'] = {'base_template': 'textarea.html'}
  
    if model_field.null:
        kwargs['allow_null'] = True

      if isinstance(model_field, models.AutoField) or not model_field.editable:
          # If this field is read-only, then return early.
          # Further keyword arguments are not valid.
          kwargs['read_only'] = True
          return kwargs
  
keep keep keep add keep keep keep keep keep keep
 Make autogenerated read only fields to be able to be nullable (#8536) 
rest_framework/utils/field_mapping.py