From 51cda112f584746fd1bedc4395df4754d2f82253 Mon Sep 17 00:00:00 2001 From: Brian Grohe Date: Fri, 19 Jun 2015 09:21:35 -0400 Subject: [PATCH] Simplified if statement to one line solution Based on feedback on the pull request, changed solution to be simpler for issue 3042 --- rest_framework/relations.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rest_framework/relations.py b/rest_framework/relations.py index e56fef5da..3024bccb8 100644 --- a/rest_framework/relations.py +++ b/rest_framework/relations.py @@ -42,8 +42,7 @@ class RelatedField(Field): 'Relational fields should not provide a `queryset` argument, ' 'when setting read_only=`True`.' ) - if 'many' in kwargs: - kwargs.pop('many') + kwargs.pop('many', None) super(RelatedField, self).__init__(**kwargs) def __new__(cls, *args, **kwargs):