[2.2.x] Fixed #31246 -- Fixed locking models in QuerySet.select_for_update(of=()) for related fields and parent link fields with multi-table inheritance.

Partly regression in 0107e3d105.

Backport of 1712a76b9d from master.
This commit is contained in:
Abhijeet Viswa 2020-02-08 10:22:09 +05:30 committed by Mariusz Felisiak
parent eeed073aa2
commit 32d89bf114
5 changed files with 75 additions and 23 deletions

View file

@ -9,4 +9,8 @@ Django 2.2.11 fixes a data loss bug in 2.2.10.
Bugfixes
========
* ...
* Fixed a data loss possibility in the
:meth:`~django.db.models.query.QuerySet.select_for_update`. When using
related fields or parent link fields with :ref:`multi-table-inheritance` in
the ``of`` argument, the corresponding models were not locked
(:ticket:`31246`).