diff --git a/apps/establishment/models.py b/apps/establishment/models.py index 5eab194e..1d693219 100644 --- a/apps/establishment/models.py +++ b/apps/establishment/models.py @@ -314,8 +314,8 @@ class EstablishmentQuerySet(models.QuerySet): """ base_qs = self.similar_base(establishment).annotate_same_subtype(establishment) similarity_rules = { - 'ordering': [F('annotate_same_subtype').desc(), ], - 'distinctions': ['annotate_same_subtype', ] + 'ordering': [F('same_subtype').desc(), ], + 'distinctions': ['same_subtype', ] } if establishment.address and establishment.address.coordinates: base_qs = base_qs.annotate_distance(point=establishment.location)