Opened 12 years ago
Closed 12 years ago
#18486 closed Bug (duplicate)
<model>.objects.none().update(**kwargs) updates everything!
Reported by: | 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)
follow-up: 2 comment:1 by , 12 years ago
comment:2 by , 12 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I suspect this is #12142 though don't have time to verify at the moment.