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