mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
Simplified if statement to one line solution
Based on feedback on the pull request, changed solution to be simpler for issue 3042
This commit is contained in:
parent
d24990ece2
commit
51cda112f5
|
@ -42,8 +42,7 @@ class RelatedField(Field):
|
||||||
'Relational fields should not provide a `queryset` argument, '
|
'Relational fields should not provide a `queryset` argument, '
|
||||||
'when setting read_only=`True`.'
|
'when setting read_only=`True`.'
|
||||||
)
|
)
|
||||||
if 'many' in kwargs:
|
kwargs.pop('many', None)
|
||||||
kwargs.pop('many')
|
|
||||||
super(RelatedField, self).__init__(**kwargs)
|
super(RelatedField, self).__init__(**kwargs)
|
||||||
|
|
||||||
def __new__(cls, *args, **kwargs):
|
def __new__(cls, *args, **kwargs):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user