      def get_related_field(self, model_field):
          """
          Creates a default instance of a flat relational field.
          """
          return PrimaryKeyRelatedField()
  
      def get_field(self, model_field):
          """
 
</s> remove         return self.to_native(obj)
 </s> add         return self.to_native(pk) </s> remove             obj = obj.serializable_value(self.source or field_name)
 </s> add             pk = obj.serializable_value(self.source or field_name) </s> remove         return [self.to_native(item.pk) for item in obj.all()]
 </s> add         return [self.to_native(item.pk) for item in queryset.all()] </s> remove             obj = getattr(obj, self.source or field_name)
            return [self.to_native(item.pk) for item in obj.all()]
 </s> add             queryset = getattr(obj, self.source or field_name)
            return [self.to_native(item.pk) for item in queryset.all()] </s> remove             obj = obj.serializable_value(self.source or field_name)
 </s> add             queryset = obj.serializable_value(self.source or field_name)
        if isinstance(model_field, models.fields.related.ManyToManyField):
            return ManyPrimaryKeyRelatedField()
      def get_related_field(self, model_field):
          """
          Creates a default instance of a flat relational field.
          """
        if isinstance(model_field, models.fields.related.ManyToManyField):
            return ManyPrimaryKeyRelatedField()
          return PrimaryKeyRelatedField()
  
      def get_field(self, model_field):
          """
keep keep keep add keep keep keep keep
 Use either PrimaryKeyRelatedField or ManyPrimaryKeyRelatedField as appropriate (fixes test) 
rest_framework/serializers.py