id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 27477 Use QuerySet.select_for_update() in admin change form to fix race condition Dave Hall nobody "There is a race condition in the admin change form where a user can edit a model instance at the same time as another user. Consider the following two operations occurring in parallel: 1. `ModelAdmin.change_view()` 2. `User.objects.update(is_superuser=True)` If (1) load the model instance, then (2) runs, then (1) saves the model instance, the update in (2) will be lost. The solution is to call `select_for_update` on the queryset in the `changeform_view()` method of `ModelAdmin`." New feature new contrib.admin dev Normal admin dave@… Jeppe Vesterbæk Someday/Maybe 0 0 0 0 0 0