﻿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
33970	select_for_update code snippet example selects for update outside of it's transaction	Thomas Frössman	nobody	"The docs suggest this for select_for_update:


{{{
entries = Entry.objects.select_for_update().filter(author=request.user)
with transaction.atomic():
    for entry in entries:
        ...
}}}


If a user does this under the default auto commit transaction circumstances the select_for_update should happen inside the transaction, not before it so it is probably best if the example follows real world usage.

"	Bug	closed	Documentation	4.0	Normal	invalid			Unreviewed	0	0	0	0	0	0
