From 49f2b06d71c2b95791bb5640bbe277a55a754485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Szulc?= Date: Tue, 29 Oct 2024 11:46:29 +0100 Subject: [PATCH] Fix bulk edit for some models --- src/ralph/admin/mixins.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ralph/admin/mixins.py b/src/ralph/admin/mixins.py index 3af0668dca..c0496a115a 100644 --- a/src/ralph/admin/mixins.py +++ b/src/ralph/admin/mixins.py @@ -541,8 +541,9 @@ def get_queryset(self, request): qs = super().get_queryset(request) id_list = request.GET.getlist(BULK_EDIT_VAR_IDS, []) if id_list: - qs = qs.filter(pk__in=id_list) - return qs + return self.model.objects.filter(id__in=id_list) + else: + return qs def get_list_display(self, request): """