From ed6b76f1c44363a14c3b8c7d7374360ab7a7ad6a Mon Sep 17 00:00:00 2001 From: David Cramer Date: Mon, 9 Feb 2009 17:46:12 -0600 Subject: [PATCH] Fix for __in lookups on pk --- django/db/models/sql/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 141b8c9dc41..8c683139ee4 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -1131,7 +1131,7 @@ def add_filter(self, filter_expr, connector=AND, negate=False, trim=False, # into the issue of separating it into many filters, and we need the value # available. if parts[-1] == 'pk': - if not hasattr(value, '__iter__'): + if not hasattr(value, '__iter__') or lookup_type == 'in': value = [value] parts = parts[:-1] for part in parts: