fix bug: admnin see all dids
This commit is contained in:
parent
d15fc0726d
commit
98ffdd0e3f
|
@ -707,12 +707,13 @@ class DidsView(Credentials, SingleTableView):
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
queryset = kwargs.pop('object_list', None)
|
queryset = kwargs.pop('object_list', None)
|
||||||
|
dids = DID.objects.filter(user=self.request.user)
|
||||||
if queryset is None:
|
if queryset is None:
|
||||||
self.object_list = self.model.objects.all()
|
self.object_list = dids.all()
|
||||||
|
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
context.update({
|
context.update({
|
||||||
'dids': DID.objects.filter(user=self.request.user),
|
'dids': dids
|
||||||
})
|
})
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue