QuerySet slices broken in corner case: QuerySet[0:0] => QuerySet[0:]
|Reported by:||enoksrd||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
If you have a QuerySet and slice with an upper bound ("end") of 0 it's treated like no upper bound at all. See attached svn diff for a fix. To reproduce: let q be a QuerySet, the q[0:0] is *all* the objects in the set. Problem due to 0 being false in Python.