write queries on related managers use the db_for_read database
|Reported by:||Tobias McNulty||Owned by:||Sławek Ehlert|
|Component:||Database layer (models, ORM)||Version:||1.3|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
If you execute a write query (update() or delete()) on a queryset obtained from a related manager, it appears to use the db_for_read database instead of the db_for_write database for that query.
The attached patch reproduces the issue on trunk. It also exists in 1.3.1.