Revert "possible fix for similar distilleries"
This reverts commit 2197863
This commit is contained in:
parent
59c9c06d64
commit
0607a56739
|
|
@ -365,10 +365,10 @@ class EstablishmentQuerySet(models.QuerySet):
|
||||||
Return QuerySet with objects that similar to Distillery.
|
Return QuerySet with objects that similar to Distillery.
|
||||||
:param distillery: Establishment instance
|
:param distillery: Establishment instance
|
||||||
"""
|
"""
|
||||||
base_qs = self.similar_base(distillery).same_subtype(distillery).exclude(same_subtype=False)
|
base_qs = self.similar_base(distillery).same_subtype(distillery)
|
||||||
similarity_rules = {
|
similarity_rules = {
|
||||||
'distinctions': [],
|
'ordering': [F('same_subtype').desc(), ],
|
||||||
'ordering': [],
|
'distinctions': ['same_subtype', ]
|
||||||
}
|
}
|
||||||
if distillery.address and distillery.address.coordinates:
|
if distillery.address and distillery.address.coordinates:
|
||||||
base_qs = base_qs.annotate_distance(point=distillery.location)
|
base_qs = base_qs.annotate_distance(point=distillery.location)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user