From c1c7b0446cabe706c3f47ee35f18cb8de5c16aa4 Mon Sep 17 00:00:00 2001 From: Goffi Date: Wed, 29 Jun 2016 13:42:35 +0200 Subject: [PATCH] quick_frontend: allow presence of entities without resource --- frontends/src/quick_frontend/quick_contact_list.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontends/src/quick_frontend/quick_contact_list.py b/frontends/src/quick_frontend/quick_contact_list.py index ceaf96d3..5873c6af 100644 --- a/frontends/src/quick_frontend/quick_contact_list.py +++ b/frontends/src/quick_frontend/quick_contact_list.py @@ -471,7 +471,8 @@ class ProfileContactList(object): if not cache[C.CONTACT_RESOURCES]: cache[C.CONTACT_MAIN_RESOURCE] = None else: - assert entity.resource + if not entity.resource: + log.warning(_(u"received presence from entity without resource: {}".format(entity))) resources_data = cache[C.CONTACT_RESOURCES] resource_data = resources_data.setdefault(entity.resource, {}) resource_data[C.PRESENCE_SHOW] = show