mirror of
https://github.com/django/django.git
synced 2025-08-02 01:53:15 +00:00
Fixed #1181 -- get_in_bulk no longer fails on empty input. Also added unit tests. Thanks, akaihola
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1834 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7104000e52
commit
bbfc645337
3 changed files with 6 additions and 1 deletions
|
@ -65,6 +65,10 @@ Article 4
|
|||
{3: Article 3}
|
||||
>>> articles.get_in_bulk([1000])
|
||||
{}
|
||||
>>> articles.get_in_bulk([])
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
AssertionError: get_in_bulk() cannot be passed an empty list.
|
||||
|
||||
# get_values() is just like get_list(), except it returns a list of
|
||||
# dictionaries instead of object instances -- and you can specify which fields
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue