Re: Delete order of generic relation models

2010-04-26 Thread Carl Meyer
Hi Ryan, Moving discussion here off the Trac ticket. On Apr 25, 5:44 pm, Ryan wrote: > A decent workaround is for my post_delete hook to pass > force_update=True and catch DatabaseError when saving the article, in > case it has already been deleted.  But I think it would be nice if > django just

Delete order of generic relation models

2010-04-25 Thread Ryan
I have a model Article and a model Vote with a generic foreign key to track user votes on articles. When a vote is deleted, I have a post_delete hook that updates the score field on the parent article. My problem is when I delete an article, django sometimes deletes the generically-related votes