Mercurial > libervia-web
changeset 1447:907f519faaf0
pages: pubsub's `extra` is now serialised, following backend change
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 29 Jul 2021 23:01:29 +0200 |
parents | e5dc0b0658af |
children | c8544f5aaa6b |
files | libervia/pages/blog/view/page_meta.py libervia/pages/lists/view_item/page_meta.py libervia/pages/merge-requests/view/page_meta.py libervia/server/pages_tools.py |
diffstat | 4 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libervia/pages/blog/view/page_meta.py Thu Jul 29 22:59:08 2021 +0200 +++ b/libervia/pages/blog/view/page_meta.py Thu Jul 29 23:01:29 2021 +0200 @@ -127,7 +127,9 @@ node, C.NO_LIMIT, [], - {C.KEY_ORDER_BY: C.ORDER_BY_CREATION}, + data_format.serialise( + {C.KEY_ORDER_BY: C.ORDER_BY_CREATION} + ), profile) except Exception as e: log.warning( @@ -153,7 +155,7 @@ node, C.NO_LIMIT, items_id, - extra, + data_format.serialise(extra), profile) except Exception as e: # FIXME: need a better way to test errors in bridge errback
--- a/libervia/pages/lists/view_item/page_meta.py Thu Jul 29 22:59:08 2021 +0200 +++ b/libervia/pages/lists/view_item/page_meta.py Thu Jul 29 23:01:29 2021 +0200 @@ -64,7 +64,8 @@ template_data["comments_service"] = comments_service = uri_data["path"] try: comments = data_format.deserialise(await self.host.bridgeCall( - "mbGet", comments_service, comments_node, C.NO_LIMIT, [], {}, profile + "mbGet", comments_service, comments_node, C.NO_LIMIT, [], + data_format.serialise({}), profile )) except BridgeException as e: if e.classname == 'NotFound' or e.condition == 'item-not-found':
--- a/libervia/pages/merge-requests/view/page_meta.py Thu Jul 29 22:59:08 2021 +0200 +++ b/libervia/pages/merge-requests/view/page_meta.py Thu Jul 29 23:01:29 2021 +0200 @@ -65,7 +65,8 @@ template_data["comments_node"] = comments_node = uri_data["node"] template_data["comments_service"] = comments_service = uri_data["path"] template_data["comments"] = data_format.deserialise(await self.host.bridgeCall( - "mbGet", comments_service, comments_node, C.NO_LIMIT, [], {}, profile + "mbGet", comments_service, comments_node, C.NO_LIMIT, [], + data_format.serialise({}), profile )) template_data["login_url"] = self.getPageRedirectURL(request)
--- a/libervia/server/pages_tools.py Thu Jul 29 22:59:08 2021 +0200 +++ b/libervia/server/pages_tools.py Thu Jul 29 23:01:29 2021 +0200 @@ -1,7 +1,6 @@ #!/usr/bin/env python3 - -# Libervia: a Salut à Toi frontend +# Libervia Web frontend # Copyright (C) 2011-2021 Jérôme Poisson <goffi@goffi.org> # This program is free software: you can redistribute it and/or modify @@ -43,7 +42,9 @@ else exception will be raised """ try: - d = self.host.bridgeCall("mbGet", service, node, C.NO_LIMIT, [], {}, profile) + d = self.host.bridgeCall( + "mbGet", service, node, C.NO_LIMIT, [], data_format.serialise({}), profile + ) except Exception as e: if not pass_exceptions: raise e