From 3be0b48c1b6bd984c9c9055f204f7d482ea6099c Mon Sep 17 00:00:00 2001 From: Hugo Levy-Falk Date: Sun, 29 Sep 2019 18:27:35 +0200 Subject: [PATCH] Fix #223 --- users/views.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/users/views.py b/users/views.py index 045446b1..c948698f 100644 --- a/users/views.py +++ b/users/views.py @@ -919,18 +919,15 @@ def index_listright(request): .order_by('name') .prefetch_related('permissions') .prefetch_related('user_set') - .prefetch_related('user_set__facture_set__vente_set__cotisation') ): rights[right] = (right.user_set .annotate(action_number=Count('revision'), - last_seen=Max('revision__date_created'), - end_adhesion=Max('facture__vente__cotisation__date_end')) + last_seen=Max('revision__date_created')) ) superusers = (User.objects .filter(is_superuser=True) .annotate(action_number=Count('revision'), - last_seen=Max('revision__date_created'), - end_adhesion=Max('facture__vente__cotisation__date_end')) + last_seen=Max('revision__date_created')) ) return render( request, @@ -978,7 +975,7 @@ def profil(request, users, **_kwargs): request.GET.get('order'), SortTable.MACHINES_INDEX ) - + optionnal_apps = [import_module(app) for app in OPTIONNAL_APPS_RE2O] optionnal_templates_list = [app.views.profil(request,users) for app in optionnal_apps]