Danny reading your reply gave me an idea to try and it worked. I switched the order of the inlines. So I put C first, then B. This way C validates properly, then B is deleted and the cascaded deletion deletes C and everything works as expected.
On Monday, March 5, 2012 6:15:18 PM UTC-5, Danny W. Adair wrote: > > Just want to add that's not the only place where this can happen. > If you hook into the post_delete() delete signal of a model with a FK, > your method can't access the FK object if it's a cascaded delete > invoked by the FK object's delete(). > I always wondered why children don't get deleted first (which is how > the database _has_ to do it anyway). > My workaround is to delete in the correct order myself but I wish I > didn't have to. > > Cheers, > Danny > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-developers/-/OJdUC_G7qXUJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
