Small refactor so that RolesView doesn't query database twice

This commit is contained in:
Elijah 2023-12-01 10:29:32 +01:00 committed by Elahi
parent 611a7abf95
commit fa3eeec327
1 changed files with 1 additions and 6 deletions

View File

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