From 84e69187ff939410139c869b01fc0e241936e1f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Fri, 17 Apr 2026 10:24:04 +0300 Subject: [PATCH] solve minor annoyance in pager macro where it would do ?&page= instead of ?page= when args was empty --- app/templates/common/macros.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/common/macros.html b/app/templates/common/macros.html index 28f74cf..cb647ab 100644 --- a/app/templates/common/macros.html +++ b/app/templates/common/macros.html @@ -11,10 +11,10 @@ {%- endmacro %} {% macro pager(current_page, page_count, classes='', url='', args={}) -%} +{%- set args = dict(args.items() | rejectattr(0, 'equalto', 'page')) -%} {%- if args -%} {#- remove the page query argument -#} -{%- set fargs = dict(args.items() | rejectattr(0, 'equalto', 'page')) -%} -{%- set url = url + (fargs | dict_to_query_string) + '&page=' -%} +{%- set url = url + (args | dict_to_query_string) + '&page=' -%} {%- else -%} {%- set url = url + '?page=' -%} {%- endif -%}