Browse Source

correction d’un filtre éronné

Élie Bouttier 7 years ago
parent
commit
3f1b9a89f0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      services/admin.py

+ 1 - 1
services/admin.py

@@ -85,7 +85,7 @@ class ActiveServiceFilter(admin.SimpleListFilter):
 
     def queryset(self, request, queryset):
         if self.value() == '0': # inactif
-            return queryset.filter(has_active_allocations=False)
+            return queryset.exclude(get_active_filter('allocation')) # has_active_allocations=False ne fonctionne pas
         if self.value() == '1': # actif
             return queryset.filter(has_active_allocations=True)