summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot <root@u15356270.onlinehome-server.com>2010-09-05 19:48:43 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-09-05 19:51:31 -0400
commit3b928e835597a156e2d1b1155bcb2859f98c0b83 (patch)
treed984386b752fd1f64e4551285c331429259c6665
parenta273eb7fbfba2a740f351767be0eab856e9cab9e (diff)
downloadaskbot-3b928e835597a156e2d1b1155bcb2859f98c0b83.tar.gz
askbot-3b928e835597a156e2d1b1155bcb2859f98c0b83.tar.bz2
askbot-3b928e835597a156e2d1b1155bcb2859f98c0b83.zip
small change to minimally support - without full text search - databases other than mysql
-rw-r--r--askbot/models/question.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/askbot/models/question.py b/askbot/models/question.py
index 3ce6dfcf..aecfd794 100644
--- a/askbot/models/question.py
+++ b/askbot/models/question.py
@@ -89,14 +89,14 @@ class QuestionManager(models.Manager):
qs = qs.filter(tags__name = tag)
if search_query:
- try:
+ if settings.DATABASE_ENGINE == 'mysql':
qs = qs.filter(
models.Q(title__search = search_query) \
| models.Q(text__search = search_query) \
| models.Q(tagnames__search = search_query) \
| models.Q(answers__text__search = search_query)
)
- except:
+ else:
#fallback to dumb title match search
qs = qs.extra(
where=['title like %s'],