diff options
author | root <root@u15356270.onlinehome-server.com> | 2010-09-05 19:48:43 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-09-05 19:51:31 -0400 |
commit | 3b928e835597a156e2d1b1155bcb2859f98c0b83 (patch) | |
tree | d984386b752fd1f64e4551285c331429259c6665 | |
parent | a273eb7fbfba2a740f351767be0eab856e9cab9e (diff) | |
download | askbot-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.py | 4 |
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'], |