diff libervia/pages/files/page_meta.py @ 1421:e065c8886b81

pages (files/list): set empty affiliations when they can't be retrieved
author Goffi <goffi@goffi.org>
date Sat, 01 May 2021 19:04:25 +0200
parents f511f8fbbf8a
children 106bae41f5c8
line wrap: on
line diff
--- a/libervia/pages/files/page_meta.py	Sat May 01 18:50:04 2021 +0200
+++ b/libervia/pages/files/page_meta.py	Sat May 01 19:04:25 2021 +0200
@@ -2,7 +2,6 @@
 
 
 from libervia.server.constants import Const as C
-from twisted.internet import defer
 from twisted.words.protocols.jabber import jid
 from sat.core.log import getLogger
 
@@ -14,12 +13,11 @@
 template = "file/discover.html"
 
 
-@defer.inlineCallbacks
-def prepare_render(self, request):
+async def prepare_render(self, request):
     profile = self.getProfile(request)
     template_data = request.template_data
     namespace = self.host.ns_map["fis"]
-    entities_services, entities_own, entities_roster = yield self.host.bridgeCall(
+    entities_services, entities_own, entities_roster = await self.host.bridgeCall(
         "discoFindByFeatures", [namespace], [], False, True, True, True, False, profile
     )
     tpl_service_entities = template_data["disco_service_entities"] = {}