diff options
Diffstat (limited to 'askbot/models/tag.py')
-rw-r--r-- | askbot/models/tag.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/askbot/models/tag.py b/askbot/models/tag.py index ed0454be..31ac9806 100644 --- a/askbot/models/tag.py +++ b/askbot/models/tag.py @@ -66,17 +66,12 @@ class TagQuerySet(models.query.QuerySet): tag_filter |= models.Q(name__startswith = next_tag[:-1]) return self.filter(tag_filter) - def get_related_to_search( - self, - questions = None, - search_state = None, - ignored_tag_names = None - ): + def get_related_to_search(self, questions, page_size, ignored_tag_names): """must return at least tag names, along with use counts handle several cases to optimize the query performance """ - if questions.count() > search_state.page_size * 3: + if questions.count() > page_size * 3: """if we have too many questions or search query is the most common - just return a list of top tags""" |