Tech Insights· forum.djangoproject.com
On Django, be careful when doing consecutive…
On Django, be careful when doing consecutive queryset.update()s. Each one executes a new UPDATE ... WHERE SQL query. There are cases where the second update might not change anything because the first one changed the rows already. Always check the original queryset filters/excludes to see if they are affected by the updates.
Shared by
- Django



