Commit 731470ba64a7e0ad9d23c0838d0a4a16e57d38ba

Authored by Carlos Coêlho
1 parent 92cb599e

Got description from attrs of list

Signed-off-by: Carlos Oliveira <carlospecter@gmail.com>
Showing 1 changed file with 5 additions and 4 deletions   Show diff stats
colab/accounts/utils/mailman.py
... ... @@ -112,11 +112,12 @@ def user_lists(user):
112 112  
113 113 def get_list_description(listname, lists=None):
114 114 if not lists:
115   - lists = dict(all_lists(description=True))
116   - elif not isinstance(lists, dict):
117   - lists = dict(lists)
  115 + lists = all_lists()
118 116  
119   - return lists.get(listname)
  117 + desc = "".join(mlist.get('description') for mlist in lists\
  118 + if isinstance(mlist, dict) and mlist.get('listname') == listname)
  119 +
  120 + return desc
120 121  
121 122  
122 123 def list_users(listname):
... ...