Skip to content

Commit

Permalink
Fix for __in lookups on pk
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Feb 9, 2009
1 parent f93d452 commit ed6b76f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/db/models/sql/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ed6b76f

Please sign in to comment.