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 ... !!!
- python : How to display not added elements in DRF
- python : Django: Does ORM support SQL Operator "All" and "Any"?
- python : Error Error Binding Parameter 5 -Probably Unsupported Type
- python : Django Select Form
- python : Why Object Of Type 'Product' Is Not JSON Serializable Error
- python : Error when opening a table through the admin panel Django
- I do not understand how to import the SYS Python module. What am I doing wrong?
- python : Creating a transparent window on top of the rest
- Generating multiple random python numbers
- python : How can I get the data of the string in which the button is pressed?