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:
Adrian Holovaty 2006-01-30 04:01:58 +00:00
parent 7ff623755a
commit 4d3763123a
1 changed files with 2 additions and 2 deletions

View File

@ -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)