Transaction handling broken in related manager modification methods
|Reported by:||akaariai||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||1.6-beta-1|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Description (last modified by akaariai)
Some of the related manager methods do multiple data-modifying operations but do not use any transaction management at all. This is clearly broken. This isn't a regression, so isn't a release blocker for that reason. However, this is a potential data corruption issue, so might be nice to fix for 1.6, too.
I am not sure how to test this. Maybe post_delete/save signals could be used to force exceptions and thus rollback.
EDIT: Forgot to add that a patch for some problematic methods available in https://github.com/django/django/pull/1684.
Change History (8)
comment:1 Changed 2 years ago by akaariai
- Description modified (diff)
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
comment:5 Changed 23 months ago by Anssi Kääriäinen <akaariai@…>
- Resolution set to fixed
- Status changed from new to closed