changeset 1848:446a1539c207

quick_frontend (blog): fixes main item update (comment's data were lost)
author souliane <souliane@mailoo.org>
date Mon, 22 Feb 2016 13:15:02 +0100
parents d8c6c55aafd7
children a754d6381550
files frontends/src/quick_frontend/quick_blog.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_blog.py	Thu Feb 18 15:41:47 2016 +0100
+++ b/frontends/src/quick_frontend/quick_blog.py	Mon Feb 22 13:15:02 2016 +0100
@@ -248,7 +248,8 @@
         """Send entry according to parent QuickBlog configuration and current level"""
 
         # keys to keep other than content*, title* and tag*
-        keys_to_keep = ('id', 'comments', 'author', 'author_jid', 'published')
+        # FIXME: see how to avoid comments node hijacking (someone could bind his post to another post's comments node)
+        keys_to_keep = ('id', 'comments', 'author', 'author_jid', 'published', 'comments_node', 'comments_service')
 
         mb_data = {}
         for key in keys_to_keep:
@@ -269,8 +270,7 @@
             raise NotImplementedError
 
         if self.level == 0:
-            if self.new:
-                mb_data["allow_comments"] = C.BOOL_TRUE
+            mb_data["allow_comments"] = C.BOOL_TRUE
 
         if self.blog.new_message_target == C.GROUP:
             common.iter2dict('group', self.blog.targets, mb_data)