diff --git a/api/examples/list-members b/api/examples/list-members index 3d61109546..d2ed81a660 100755 --- a/api/examples/list-members +++ b/api/examples/list-members @@ -41,5 +41,5 @@ parser.add_option_group(humbug.generate_option_group(parser)) client = humbug.init_from_options(options) -for name, email in client.get_members()["members"]: - print name, email +for user in client.get_members()["members"]: + print user["full_name"], user["email"] diff --git a/zephyr/views.py b/zephyr/views.py index a31253d0ad..cb5618ecd2 100644 --- a/zephyr/views.py +++ b/zephyr/views.py @@ -1319,7 +1319,8 @@ def json_get_members(request, user_profile): return get_members_backend(request, user_profile) def get_members_backend(request, user_profile): - members = [(profile.full_name, profile.email) for profile in \ + members = [{"full_name": profile.full_name, + "email": profile.email} for profile in \ UserProfile.objects.select_related().filter(realm=user_profile.realm)] return json_success({'members': members})