From bbd129711cf1e975ba7ad37dfda12bd54f8fd6ba Mon Sep 17 00:00:00 2001 From: Martin Mahner Date: Sat, 23 Nov 2024 15:48:10 +0100 Subject: [PATCH] Fix empty filter field after submission. Fixes #109 --- .gitignore | 2 +- CHANGELOG.md | 3 ++- dynamic_raw_id/filters.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7984157..06b9a94 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -*.pyc +poetry.lock .coverage coverage_report django_dynamic_raw_id.egg-info diff --git a/CHANGELOG.md b/CHANGELOG.md index e2aac73..d0b91a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ # Changelog -## WIP +## v4.3 (2024-11-23) - Django 5.1 compatibility and tests. +- Empty filter form field after submission. https://github.com/lincolnloop/django-dynamic-raw-id/issues/109 ## v4.2 (2024-06-18) diff --git a/dynamic_raw_id/filters.py b/dynamic_raw_id/filters.py index a73b633..943c765 100644 --- a/dynamic_raw_id/filters.py +++ b/dynamic_raw_id/filters.py @@ -74,7 +74,7 @@ def get_form( admin_site=admin_site, rel=rel, field_name=self.field_path, - data=self.used_parameters, + data={self.field_path: request.GET.get(self.field_path, "")}, ) def queryset(