Browse Source

fix duplication de services dû à une annotation

Élie Bouttier 7 years ago
parent
commit
b1738f4d7b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      services/models.py

+ 1 - 1
services/models.py

@@ -83,7 +83,7 @@ class ActiveServiceManager(models.Manager):
                         output_field=models.BooleanField()
                     )
         )
-        qs = qs.order_by('pk', '-has_active_allocations').distinct() # complicated things here, do not touch if you're not sure
+        qs = qs.order_by('pk', '-has_active_allocations').distinct('pk') # complicated things here, do not touch if you're not sure
         return qs