Commit 5d6a9964 by Ben Firshman Committed by Alex Gaynor

Use pk lookup for longs

parent bec0cf13
......@@ -56,7 +56,7 @@ class TaggableManager(object):
qs = TaggedItem.objects.filter(tag__in=value)
elif all(isinstance(v, basestring) for v in value):
qs = TaggedItem.objects.filter(tag__name__in=value)
elif all(isinstance(v, int) for v in value):
elif all(isinstance(v, (int, long)) for v in value):
# This one is really ackward, just don't do it. The ORM does it
# for deletes, but no one else gets to.
qs = TaggedItem.objects.filter(pk__in=value)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment