magic-removal: Changed exception text for in_bulk() error
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2173 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7ff623755a
commit
4d3763123a
|
@ -64,8 +64,8 @@ class Manager(QuerySet):
|
|||
klass._default_manager = self
|
||||
|
||||
def in_bulk(self, id_list, *args, **kwargs):
|
||||
assert isinstance(id_list, list), "get_in_bulk() must be provided with a list of IDs."
|
||||
assert id_list != [], "get_in_bulk() cannot be passed an empty ID list."
|
||||
assert isinstance(id_list, list), "in_bulk() must be provided with a list of IDs."
|
||||
assert id_list != [], "in_bulk() cannot be passed an empty ID list."
|
||||
kwargs['where'] = ["%s.%s IN (%s)" % (backend.quote_name(self.klass._meta.db_table), backend.quote_name(self.klass._meta.pk.column), ",".join(['%s'] * len(id_list)))]
|
||||
kwargs['params'] = id_list
|
||||
obj_list = self.get_list(*args, **kwargs)
|
||||
|
|
Loading…
Reference in New Issue