mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-24 08:14:16 +03:00
Fix typo reported by @diviei
This commit is contained in:
parent
9a741e7ddb
commit
d97c712124
|
@ -254,7 +254,7 @@ When serializing objects using a nested representation any occurances of recursi
|
||||||
def get_related_field(self, model_field, to_many=False):
|
def get_related_field(self, model_field, to_many=False):
|
||||||
queryset = model_field.rel.to._default_manager
|
queryset = model_field.rel.to._default_manager
|
||||||
if to_many:
|
if to_many:
|
||||||
return return serializers.ManyRelatedField(queryset=queryset)
|
return serializers.ManyRelatedField(queryset=queryset)
|
||||||
return serializers.RelatedField(queryset=queryset)
|
return serializers.RelatedField(queryset=queryset)
|
||||||
|
|
||||||
def get_field(self, model_field):
|
def get_field(self, model_field):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user