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:
Brian Grohe 2015-06-19 09:21:35 -04:00
parent d24990ece2
commit 51cda112f5

View File

@ -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):