fix bug: admnin see all dids

This commit is contained in:
Cayo Puigdefabregas 2024-02-06 18:13:57 +01:00
parent d15fc0726d
commit 98ffdd0e3f
1 changed files with 3 additions and 2 deletions

View File

@ -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