From 450c9c0a1520358e8fbea3e66443f3373b4df17a Mon Sep 17 00:00:00 2001 From: Goffi Date: Sun, 15 Jan 2017 16:00:40 +0100 Subject: [PATCH] quick frontend (contact list): fixed cached key removal --- frontends/src/quick_frontend/quick_contact_list.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontends/src/quick_frontend/quick_contact_list.py b/frontends/src/quick_frontend/quick_contact_list.py index 7c7e27cd..1f5a7942 100644 --- a/frontends/src/quick_frontend/quick_contact_list.py +++ b/frontends/src/quick_frontend/quick_contact_list.py @@ -395,7 +395,11 @@ class ProfileContactList(object): cache_attr = cache[C.CONTACT_RESOURCES].setdefault(entity.resource, {}) if entity.resource else cache for attribute, value in attributes.iteritems(): if value is None: - cache_attr[attribute].pop(value, None) + # XXX: pyjamas hack: we need to use pop instead of del + try: + cache_attr[attribute].pop(value) + except KeyError: + pass else: cache_attr[attribute] = value