From 4103d87e1640dedd04ce40a8af0a00c4235d74c2 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 31 Aug 2011 16:16:30 +0530 Subject: [PATCH] remove single quotes on models.py line 38 --- gazetteer/places/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gazetteer/places/models.py b/gazetteer/places/models.py index 1c0bc8d..a12bed5 100644 --- a/gazetteer/places/models.py +++ b/gazetteer/places/models.py @@ -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],