remove single quotes on models.py line 38

This commit is contained in:
Sanj 2011-08-31 16:16:30 +05:30
parent 79aca4260f
commit 4103d87e16

View File

@ -35,7 +35,7 @@ class FeatureSearchManager(models.GeoManager):
self.set_threshold(threshold)
text = text.replace("'", "''") # escape the '
# use the pg_trgm index
qset = qset.extra(select={"similarity":"similarity(preferred_name, '%s')"},
qset = qset.extra(select={"similarity":"similarity(preferred_name, %s)"},
select_params=[text],
where=["preferred_name %% '%s'"],
params=[text],