  
          field_class = field_mapping[model_field]
          field_kwargs = get_field_kwargs(field_name, model_field)
  
          if 'choices' in field_kwargs:
              # Fields with choices get coerced into `ChoiceField`
              # instead of using their regular typed field.
              field_class = self.serializer_choice_field
 
</s> remove     NullableForeignKeySource, NullableOneToOneSource,
 </s> add     NullableForeignKeySource, NullableOneToOneSource, OneToOnePKSource,
        # Special case to handle when a OneToOneField is also the primary key
        if model_field.one_to_one and model_field.primary_key:
            field_class = self.serializer_related_field
            field_kwargs['queryset'] = model_field.related_model.objects

  
          field_class = field_mapping[model_field]
          field_kwargs = get_field_kwargs(field_name, model_field)
  
        # Special case to handle when a OneToOneField is also the primary key
        if model_field.one_to_one and model_field.primary_key:
            field_class = self.serializer_related_field
            field_kwargs['queryset'] = model_field.related_model.objects

          if 'choices' in field_kwargs:
              # Fields with choices get coerced into `ChoiceField`
              # instead of using their regular typed field.
              field_class = self.serializer_choice_field
keep keep keep add keep keep keep keep
 Special case for when OneToOneField is also primary key.

https://github.com/encode/django-rest-framework/issues/5135 
rest_framework/serializers.py