server/search: fix sort:random

This commit is contained in:
rr- 2016-08-26 23:27:33 +02:00
parent fa60b42f65
commit 6d26b5c37a

View file

@ -10,7 +10,7 @@ def _format_dict_keys(source):
def _get_order(order, default_order):
if order == tokens.SortToken.SORT_DEFAULT:
return default_order
return default_order or tokens.SortToken.SORT_ASC
if order == tokens.SortToken.SORT_NEGATED_DEFAULT:
if default_order == tokens.SortToken.SORT_ASC:
return tokens.SortToken.SORT_DESC