QuerySet.in_bulk() should accept a set()
--- django/db/models/query.py (revision 11751)
+++ django/db/models/query.py (working copy)
@@ -356,7 +356,7 @@
"""
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 {}
Change History
(4)
Component: |
Uncategorized → Database layer (models, ORM)
|
Has patch: |
set
|
Description: |
modified (diff)
|
Triage Stage: |
Unreviewed → Ready for checkin
|
Version: |
1.1 → SVN
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
(In [11915]) Fixed #12251 - QuerySet.in_bulk() should accept set/frozenset
Thanks to emulbreh for patch.