Small refactor so that RolesView doesn't query database twice
This commit is contained in:
parent
611a7abf95
commit
fa3eeec327
|
@ -419,12 +419,7 @@ class RolesView(AccessControl, SingleTableView):
|
|||
if queryset is None:
|
||||
self.object_list = self.model.objects.all()
|
||||
|
||||
context = super().get_context_data(**kwargs)
|
||||
context.update({
|
||||
'roles': Rol.objects,
|
||||
})
|
||||
|
||||
return context
|
||||
return super().get_context_data(**kwargs)
|
||||
|
||||
|
||||
class RolRegisterView(AccessControl, CreateView):
|
||||
|
|
Loading…
Reference in a new issue