mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-19 21:11:04 +03:00
Fixed many=False issue in related fields
Added check to pop many from kwargs before passing to __init__ Fixed my lint issue from the previous commit
This commit is contained in:
parent
79736e516a
commit
d24990ece2
|
@ -42,6 +42,8 @@ class RelatedField(Field):
|
|||
'Relational fields should not provide a `queryset` argument, '
|
||||
'when setting read_only=`True`.'
|
||||
)
|
||||
if 'many' in kwargs:
|
||||
kwargs.pop('many')
|
||||
super(RelatedField, self).__init__(**kwargs)
|
||||
|
||||
def __new__(cls, *args, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue
Block a user