Fix typo in how we order search results

`.desc()` needs to be on the field
This commit is contained in:
Joseph Schorr 2017-11-30 14:53:23 -05:00
parent 3b8feeba4c
commit 0440cca3ef

View file

@ -513,8 +513,7 @@ def _get_sorted_matching_repositories(lookup_value, repo_kind='image', include_p
.join(Namespace, on=(Namespace.id == Repository.namespace_user))
.switch(Repository)
.join(RepositorySearchScore)
.order_by(RepositorySearchScore.score)
.desc())
.order_by(RepositorySearchScore.score.desc()))
else:
if search_fields is None:
search_fields = set([SEARCH_FIELDS.description.name, SEARCH_FIELDS.name.name])