Home>

All trite simply: there is a model with data of offices, and there is a model of orders where

Warehouse= Models.ForeignKey (Warehouse, On_Delete= Models.do_Nothing, Verbose_Name= 'NP Branch, Blank= True, NULL= TRUE)

It turned out that when updating the Warehouse model (third-party application), the entire table is cleared, and the correspondent model is fully cleaned.
Yes, this is my mistake to specify Cascade and not do_nothing.
Are there any options to roll back the changes in the Order Table? And in general, is it possible in Django from the box protection here from such errors?
Help ... !!!

What database use?

Andrew Holovko2021-04-06 10:53:18