diff libervia/server/pages_tools.py @ 1302:04e7dd6b6f4d

pages (blog, tickets, merge-requests): updated code to handle new serialisation, following backend changes
author Goffi <goffi@goffi.org>
date Thu, 16 Jul 2020 09:08:47 +0200
parents f511f8fbbf8a
children 822bd0139769
line wrap: on
line diff
--- a/libervia/server/pages_tools.py	Fri Jun 19 16:47:51 2020 +0200
+++ b/libervia/server/pages_tools.py	Thu Jul 16 09:08:47 2020 +0200
@@ -19,17 +19,18 @@
 
 """Helper methods for common operations on pages"""
 
+from twisted.internet import defer
 from sat.core.i18n import _
+from sat.core.log import getLogger
+from sat.tools.common import data_format
 from libervia.server.constants import Const as C
-from twisted.internet import defer
-from sat.core.log import getLogger
+
 
 log = getLogger(__name__)
-from sat.tools.common import data_objects
 
 
-def commentsDataToObjects(comments_data):
-    return data_objects.BlogItems(comments_data)
+def deserialise(comments_data_s):
+    return data_format.deserialise(comments_data_s)
 
 
 def retrieveComments(self, service, node, profile, pass_exceptions=True):
@@ -54,5 +55,5 @@
             )
             return defer.succeed([])
 
-    d.addCallback(commentsDataToObjects)
+    d.addCallback(deserialise)
     return d