alfortville: limit roles displayed in copies popup
This commit is contained in:
parent
e78bbf2fdd
commit
21252d1e20
|
@ -99,6 +99,13 @@ class Copies(DetailView):
|
|||
context['checked_avis'] = checked_dicts[Inbox.AVIS]
|
||||
context['checked_mandatory_avis'] = checked_dicts[Inbox.MANDATORY_AVIS]
|
||||
context['roles'] = get_wcs_data('api/roles').get('data')
|
||||
context['roles'] = [x for x in context['roles'] if
|
||||
x['text'].startswith('Elu') or
|
||||
x['text'].startswith('Cabinet') or
|
||||
x['text'].startswith('Direction') or
|
||||
x['text'].startswith('DGA') or
|
||||
x['text'].startswith('DGS')]
|
||||
context['roles'].sort(lambda x, y: cmp(x['text'], y['text']))
|
||||
return context
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue