diff forums/tools.py @ 1001:c6c3ba5cf6eb

V2 news stories use forums for comments.
author Brian Neal <bgneal@gmail.com>
date Thu, 26 Nov 2015 00:27:42 -0600
parents 9e803323a0d0
children
line wrap: on
line diff
--- a/forums/tools.py	Tue Nov 24 22:55:18 2015 -0600
+++ b/forums/tools.py	Thu Nov 26 00:27:42 2015 -0600
@@ -88,6 +88,7 @@
     'sticky' - if True, the post will be stickied
     'locked' - if True, the post will be locked
 
+    The new topic is returned.
     """
     try:
         forum = Forum.objects.get(slug=forum_slug)
@@ -110,6 +111,7 @@
 
     notify_new_topic(topic)
     notify_new_post(post)
+    return topic
 
 
 def auto_favorite(post):