From 98ffdd0e3f0ac54fe4417b3ebd130490394a07e9 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 6 Feb 2024 18:13:57 +0100 Subject: [PATCH] fix bug: admnin see all dids --- idhub/admin/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/idhub/admin/views.py b/idhub/admin/views.py index 6cc4c74..25ac28d 100644 --- a/idhub/admin/views.py +++ b/idhub/admin/views.py @@ -707,12 +707,13 @@ class DidsView(Credentials, SingleTableView): def get_context_data(self, **kwargs): queryset = kwargs.pop('object_list', None) + dids = DID.objects.filter(user=self.request.user) if queryset is None: - self.object_list = self.model.objects.all() + self.object_list = dids.all() context = super().get_context_data(**kwargs) context.update({ - 'dids': DID.objects.filter(user=self.request.user), + 'dids': dids }) return context