Commit b57841f9ee1afc8be1c795c7bf7eac4707ace20f

Authored by Gust
Committed by Sergio Oliveira
1 parent 8477b7b4

Use colab database to get the privacy information

Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
Signed-off-by: Alexandre Barbosa <alexandreab@live.com>
Showing 1 changed file with 6 additions and 2 deletions   Show diff stats
colab/super_archives/views.py
... ... @@ -134,7 +134,11 @@ class ThreadDashboardView(View):
134 134 def get(self, request):
135 135 MAX = 6
136 136 context = {}
137   - all_privates = dict(mailman.all_lists(private=True))
  137 +
  138 + all_privates = {}
  139 + private_mailinglist = MailingList.objects.filter(is_private=True)
  140 + for ml in private_mailinglist:
  141 + all_privates[ml.name] = True
138 142  
139 143 context['lists'] = []
140 144  
... ... @@ -144,7 +148,7 @@ class ThreadDashboardView(View):
144 148 lists_for_user = mailman.get_user_mailinglists(user)
145 149  
146 150 for list_ in MailingList.objects.order_by('name'):
147   - if not all_privates[list_.name] or list_.name in lists_for_user:
  151 + if list_.name not in all_privates or list_.name in lists_for_user:
148 152 context['lists'].append((
149 153 list_.name,
150 154 mailman.get_list_description(list_.name),
... ...