Browse Source

HOT-FIX: Corrige erro de 7bdc8f9

pull/736/merge
LeandroRoberto 8 years ago
parent
commit
da847dced2
  1. 9
      sapl/crud/base.py

9
sapl/crud/base.py

@ -234,15 +234,14 @@ class CrudBaseMixin(CrispyLayoutFormMixin):
if hasattr(obj, 'public'): if hasattr(obj, 'public'):
self.permission_required = list( self.permission_required = list(
set(self.permission_required) - set(obj.public)) set(self.permission_required) - set(obj.public))
else:
self.permission_required = tuple((
self.permission(pr) for pr in self.permission_required))
if not hasattr(obj, 'públic'):
obj.public = list( obj.public = list(
set(self.permission_required) - set(self.permission_required) -
set((RP_LIST, RP_DETAIL, RP_ADD, RP_CHANGE, RP_DELETE))) set((RP_LIST, RP_DETAIL, RP_ADD, RP_CHANGE, RP_DELETE)))
self.permission_required = tuple((
self.permission(pr) for pr in self.permission_required))
else: else:
obj.public = [] obj.public = []

Loading…
Cancel
Save