diff options
| author | Tom Christie | 2014-09-12 10:59:51 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-09-12 10:59:51 +0100 |
| commit | 250755def707e1397876614fa0c08130d9fcc449 (patch) | |
| tree | c909eb57e1601a5c8119a6fb3e1a797f8ada0bb1 /tests | |
| parent | 6db3356c4d1aa4f9a042b0ec67d47238abc16dd7 (diff) | |
| download | django-rest-framework-250755def707e1397876614fa0c08130d9fcc449.tar.bz2 | |
Clean up relational fields queryset usage
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_generics.py | 4 |
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 |
