aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_generics.py
diff options
context:
space:
mode:
authorTom Christie2014-09-12 10:59:51 +0100
committerTom Christie2014-09-12 10:59:51 +0100
commit250755def707e1397876614fa0c08130d9fcc449 (patch)
treec909eb57e1601a5c8119a6fb3e1a797f8ada0bb1 /tests/test_generics.py
parent6db3356c4d1aa4f9a042b0ec67d47238abc16dd7 (diff)
downloaddjango-rest-framework-250755def707e1397876614fa0c08130d9fcc449.tar.bz2
Clean up relational fields queryset usage
Diffstat (limited to 'tests/test_generics.py')
-rw-r--r--tests/test_generics.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_generics.py b/tests/test_generics.py
index 17bfca2f..51004edf 100644
--- a/tests/test_generics.py
+++ b/tests/test_generics.py
@@ -547,7 +547,9 @@ class ClassA(models.Model):
class ClassASerializer(serializers.ModelSerializer):
- childs = serializers.PrimaryKeyRelatedField(many=True, source='childs')
+ childs = serializers.PrimaryKeyRelatedField(
+ many=True, queryset=ClassB.objects.all()
+ )
class Meta:
model = ClassA