Commit 87e9e4a6636ee0f32ea1658921d11ade0372299b
Committed by
Charles Oliveira
1 parent
d921a387
Exists in
master
and in
28 other branches
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): | ... | ... |