Skip to content
All lessons

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

Read on forum.djangoproject.com
  • Django

Book a call

Lessons like this one
shape how we build.

Tell us what you’re building. In one call, we’ll show you how our team would approach it.

Tell us what you’re building, and we’ll show you how we’d approach it.

Still prefer the good old email? Contact us