Re: Calling update() on EmptyQuerySet updates all rows in database

2009-11-03 Thread Jacob Kaplan-Moss
On Tue, Nov 3, 2009 at 7:42 AM, Jens Ådne Rydland wrote: > This seems to be caused by EmptyQuerySet not overriding update(), > shouldn't this just return 0? Yup, that's a bug. Can you please open a ticket so that we don'

Calling update() on EmptyQuerySet updates all rows in database

2009-11-03 Thread Jens Ådne Rydland
Came across an issue with EmptyQuerySet today, it seems it does not behave correctly with regard to update(). (or that the documentation is lacking, I suspect it's the former) Assuming I have a model Foo of which I have say 42 stored instances in the database, each with a CharacterField

Re: EmptyQuerySet

2008-04-29 Thread [EMAIL PROTECTED]
t; > (This kind of thing is useful sometimes when building up a QuerySet in > stages.  That isn't one of the use cases given for .none() in the > docs, but the test suite does say "none() returns an EmptyQuerySet > that behaves like any other QuerySet object", so it would

Re: EmptyQuerySet

2008-04-29 Thread James Bennett
On Tue, Apr 29, 2008 at 5:00 PM, Luke Plant <[EMAIL PROTECTED]> wrote: > I've created a patch, which special cases EmptyQuerySet in a couple of > places, which seems to be the simplest way of doing it. I can commit > it myself, but I wanted to pass it by you first since I&

EmptyQuerySet

2008-04-29 Thread Luke Plant
s say "none() returns an EmptyQuerySet that behaves like any other QuerySet object", so it would be nice if the above worked). I've created a patch, which special cases EmptyQuerySet in a couple of places, which seems to be the simplest way of doing it. I can commit it myself, but