1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #7698 -- Handle '0' correctly when used as the upper bound of a slice.

Based on a patch from enoksrd.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@7885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2008-07-11 12:43:27 +00:00
parent 88c17b5821
commit 2b193f6100
2 changed files with 9 additions and 5 deletions

View File

@@ -810,5 +810,9 @@ used in lookups.
>>> Item.objects.filter(created__in=[time1, time2])
[<Item: one>, <Item: two>]
Bug #7698 -- People like to slice with '0' as the high-water mark.
>>> Item.objects.all()[0:0]
[]
"""}