Fix search by removing description as a searched field.

This commit is contained in:
yackob03 2013-09-30 23:18:05 -04:00
parent 9cb19601a8
commit abd4e8a7ab

View file

@ -112,9 +112,7 @@ def get_visible_repositories(username=None):
def get_matching_repositories(repo_term, username=None):
visible = get_visible_repositories(username)
search_clauses = (Repository.name ** ('%' + repo_term + '%') |
Repository.namespace ** ('%' + repo_term + '%') |
Repository.description ** ('%' + repo_term + '%'))
Repository.namespace ** ('%' + repo_term + '%'))
final = visible.where(search_clauses).limit(10)
return list(final)