1
0
mirror of https://github.com/django/django.git synced 2025-10-29 08:36:09 +00:00

Fixed #19918 -- Modified select_for_update to run on the write database.

This commit is contained in:
Alex Cucu
2013-02-26 11:51:56 +02:00
committed by Tim Graham
parent 1280675834
commit 1c64a0f29e
2 changed files with 14 additions and 1 deletions

View File

@@ -742,6 +742,7 @@ class QuerySet(object):
# Default to false for nowait
nowait = kwargs.pop('nowait', False)
obj = self._clone()
obj._for_write = True
obj.query.select_for_update = True
obj.query.select_for_update_nowait = nowait
return obj