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): """