Opened 12 years ago

Closed 12 years ago

#18486 closed Bug (duplicate)

<model>.objects.none().update(**kwargs) updates everything!

Reported by: joseph.daywalt@… Owned by: nobody
Component: Database layer (models, ORM) Version: 1.1
Severity: Normal Keywords: update none emptyqueryset
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I know this is an old version, but I haven't seen any tickets relating to it for any version period. I'll look into some of the newer versions after I clean up the mess this made in production.

For a hypothetical model Cheese with more than 0 rows in the table, run Cheese.objects.none().update(kwargs) and it updates the whole table. It should short-circuit and return 0.

Change History (2)

comment:1 by anonymous, 12 years ago

I suspect this is #12142 though don't have time to verify at the moment.

in reply to:  1 comment:2 by Claude Paroz, 12 years ago

Resolution: duplicate
Status: newclosed

Replying to anonymous:

I suspect this is #12142 though don't have time to verify at the moment.

Yes, it is. Apparently, it has been fixed in the latest 1.1 release (1.1.4).

Note: See TracTickets for help on using tickets.
Back to Top