mirror of
https://github.com/django/django.git
synced 2025-09-24 19:23:03 +00:00
Fixed #12251 - QuerySet.in_bulk() should accept set/frozenset
Thanks to emulbreh for patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11915 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
01acd99947
commit
7efd96844d
2 changed files with 7 additions and 1 deletions
|
@ -386,7 +386,7 @@ class QuerySet(object):
|
|||
"""
|
||||
assert self.query.can_filter(), \
|
||||
"Cannot use 'limit' or 'offset' with in_bulk"
|
||||
assert isinstance(id_list, (tuple, list)), \
|
||||
assert isinstance(id_list, (tuple, list, set, frozenset)), \
|
||||
"in_bulk() must be provided with a list of IDs."
|
||||
if not id_list:
|
||||
return {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue