From dcf8189cb0e517e601ef5fba55081373a5f2ae82 Mon Sep 17 00:00:00 2001 From: Badlop Date: Fri, 21 May 2021 12:57:45 +0200 Subject: [PATCH] Fix table sorting: URLs now end with /, even the queries --- mod_statsdx/src/mod_statsdx.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod_statsdx/src/mod_statsdx.erl b/mod_statsdx/src/mod_statsdx.erl index a59b5fc..063b8c2 100644 --- a/mod_statsdx/src/mod_statsdx.erl +++ b/mod_statsdx/src/mod_statsdx.erl @@ -1219,7 +1219,7 @@ get_sort_query(Q) -> end. get_sort_query2(Q) -> {value, {_, Binary}} = lists:keysearch(<<"sort">>, 1, Q), - Integer = binary_to_integer(Binary), + Integer = binary_to_integer(lists:nth(1, binary:split(Binary, <<"/">>))), case Integer >= 0 of true -> {ok, {normal, Integer}}; false -> {ok, {reverse, abs(Integer)}}