We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d6770a commit d6e1b88Copy full SHA for d6e1b88
tests/query/tests.py
@@ -234,6 +234,13 @@ def test_multiple_filter_on_same_name(self):
234
[]
235
)
236
237
+ # Tests chaining on primary keys
238
+ blog_id = Blog.objects.get().id
239
+ self.assertEqual(
240
+ Blog.objects.filter(pk = blog_id).filter(pk = blog_id).get(),
241
+ Blog.objects.get()
242
+ )
243
+
244
def test_negated_Q(self):
245
blogs = [Blog.objects.create(title=title) for title in
246
('blog', 'other blog', 'another blog')]
0 commit comments