| Issue 55: | 500s generated if user account is deleted but containing thread is not | |
| 1 person starred this issue and may be notified of changes. | Back to list |
If a thread is started by someone who turns out to be a spammer, and you
delete that spammer's account, it leaves an empty thread in the system. The
forum templates include {% url profile_detail
latest_post.author %} , which now generates 500 errors for the containing
forum.
The temp fix is to delete the empty thread via the admin, but the view
logic should accommodate this to prevent 500s.
Mar 6, 2009
#1
mand...@gmail.com
Mar 7, 2009
django-forum folks -- sorry about the noise.
{% url profile_detail latest_post.author %} was my addition and is not in the
templates for this project. Nonetheless I think there is a still a problem with
empty threads ... any advice is appreciated.
shacker,
I got a hack for this for now, just added an {% if %} statement.
http://dpaste.com/8742/
Mar 7, 2009
I think it would be good to add either an on_delete signal, or code in the Post .delete() method, to determine if the post is the only one for a thread and then delete that thread if it is. I'm unsure of the best way to handle deleted users though; we probably should have *some* sort of logic to stop things becoming totally broken. If somebody beats me to a patch for the 'delete' handling though it'd be appreciated - the user issue causes fewer problems than having empty threads IMO.
Status:
Accepted
May 2, 2009
(No comment was entered for this change.)
Owner:
rwpoulton
|