From 6d26b5c37a04825b8d09db11ce0512038bcc9c7a Mon Sep 17 00:00:00 2001 From: rr- Date: Fri, 26 Aug 2016 23:27:33 +0200 Subject: [PATCH] server/search: fix sort:random --- server/szurubooru/search/executor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/szurubooru/search/executor.py b/server/szurubooru/search/executor.py index a4b0d44a..61d4f74d 100644 --- a/server/szurubooru/search/executor.py +++ b/server/szurubooru/search/executor.py @@ -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