doorcontrol: Simplify querystring handling using new querystring tag
Some checks failed
Ruff / ruff (push) Successful in 1m4s
Test / test (push) Failing after 5m1s

This commit is contained in:
Adam Goldsmith 2024-08-17 00:26:22 -04:00
parent bf3433bb3d
commit e4c6fab011
2 changed files with 1 additions and 6 deletions

View File

@ -10,7 +10,7 @@
{% for report_name, report_url in report_types %} {% for report_name, report_url in report_types %}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link{% if report_name == selected_report %} active{% endif %}" <a class="nav-link{% if report_name == selected_report %} active{% endif %}"
href="{{ report_url }}?{{ query_params }}">{{ report_name }}</a> href="{{ report_url }}{% querystring page=None %}">{{ report_name }}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>

View File

@ -98,11 +98,6 @@ class BaseAccessReport(
context["selected_report"] = self._selected_report() context["selected_report"] = self._selected_report()
context["items_per_page"] = self.get_paginate_by(None) context["items_per_page"] = self.get_paginate_by(None)
query_params = self.request.GET.copy()
if "page" in query_params:
query_params.pop("page")
context["query_params"] = query_params.urlencode()
return context return context