When hard-deleting an instance we first delete related records but the code was not taking into account soft-deleted related records which will result in the instance delete failing due to a referential constraint because soft-deleted records are not really deleted when it comes to table constraints. This fixes the issue by simply passing read_deleted='yes' to the related record model query in the hard delete path. The related unit test is updated to cover this scenario and a typo in that same test is also fixed here. Change-Id: I9fc5a9cc40ceffc450c1fde1df7fb36581e9cc94 Closes-Bug: #1830438changes/98/661398/3
parent
d4f58f5eb6
commit
0b92c7e741
Loading…
Reference in new issue