diff gpp/forums/views/main.py @ 293:c92fb89dbc7d

Fixed a bug where if you tried to delete a topic the new last post might be in that topic, so a cascading delete would occur and the forum would get deleted.
author Brian Neal <bgneal@gmail.com>
date Wed, 29 Dec 2010 04:56:53 +0000
parents 72fd300685d5
children 26fc9ac9a0eb
line wrap: on
line diff
--- a/gpp/forums/views/main.py	Fri Dec 24 22:20:30 2010 +0000
+++ b/gpp/forums/views/main.py	Wed Dec 29 04:56:53 2010 +0000
@@ -472,7 +472,7 @@
     post counts as that doesn't seem to be worth the effort.
     """
     if topic.forum.last_post and topic.forum.last_post.topic == topic:
-        topic.forum.last_post_pre_delete()
+        topic.forum.last_post_pre_delete(deleting_topic=True)
         topic.forum.save()
 
     # delete subscriptions to this topic