From d230a2a5308cdedfc434bdd55a6d1890bff08c87 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jul 13 2016 12:33:18 +0000 Subject: Fix retrieving the list of subscriptions to a hub --- diff --git a/hubs/widgets/fedmsgstats.py b/hubs/widgets/fedmsgstats.py index 986951b..533c563 100755 --- a/hubs/widgets/fedmsgstats.py +++ b/hubs/widgets/fedmsgstats.py @@ -22,8 +22,10 @@ def data(session, widget, username): url = url.format(username=username) response = requests.get(url) fedmsgs = response.json()['total'] + sub_list = [] for assoc in widget.hub.associations: - sub_list = [u.name for u in assoc.user.subscriptions] + if assoc.user: + sub_list = [u.name for u in assoc.user.subscriptions] subscribers = [u.username for u in widget.hub.subscribers] return dict( username=username,