Browse Source

HOT-FIX: Corrige erro inserido em ffcf627

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

8
sapl/crud/base.py

@ -238,6 +238,14 @@ class CrudBaseMixin(CrispyLayoutFormMixin):
self.permission_required = tuple(( self.permission_required = tuple((
self.permission(pr) for pr in self.permission_required)) self.permission(pr) for pr in self.permission_required))
if not hasattr(obj, 'públic'):
obj.public = list(
set(self.permission_required) -
set((RP_LIST, RP_DETAIL, RP_ADD, RP_CHANGE, RP_DELETE)))
else:
obj.public = []
@classmethod @classmethod
def url_name(cls, suffix): def url_name(cls, suffix):
return '%s_%s' % (cls.model._meta.model_name, suffix) return '%s_%s' % (cls.model._meta.model_name, suffix)

Loading…
Cancel
Save