changeset 2034:3f745370a39a

quick frontend (app): fixed regression in groups handling
author Goffi <goffi@goffi.org>
date Wed, 10 Aug 2016 23:23:48 +0200
parents e3f1bd9dd009
children 5c6db4329288
files frontends/src/quick_frontend/quick_app.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_app.py	Tue Aug 09 01:11:22 2016 +0200
+++ b/frontends/src/quick_frontend/quick_app.py	Wed Aug 10 23:23:48 2016 +0200
@@ -23,6 +23,7 @@
 from sat.core.i18n import _
 from sat.core import exceptions
 from sat.tools import trigger
+from sat.tools.common import data_format
 
 from sat_frontends.tools import jid
 from sat_frontends.quick_frontend import quick_widgets
@@ -689,10 +690,7 @@
                 if not 'content' in data:
                     log.warning("No content found in microblog data")
                     return
-                if 'groups' in data:
-                    _groups = set(data['groups'].split() if data['groups'] else [])
-                else:
-                    _groups = None
+                _groups = set(data_format.dict2iter('group', data)) or None  # FIXME: check if [] make sense (instead of None)
 
                 for wid in self.widgets.getWidgets(quick_blog.QuickBlog):
                     wid.addEntryIfAccepted(service_s, node, data, _groups, profile)