diff --git a/sapl/compilacao/models.py b/sapl/compilacao/models.py index 1531e6542..6752a82c1 100644 --- a/sapl/compilacao/models.py +++ b/sapl/compilacao/models.py @@ -210,7 +210,7 @@ class TextoArticulado(TimestampedMixin): if request.user in self.owners.all(): return True - if self.privacidade == STATUS_TA_RESTRICT and\ + if self.privacidade == STATUS_TA_IMMUTABLE_RESTRICT and\ request.user.has_perm( 'compilacao.view_restricted_textoarticulado'): return True diff --git a/sapl/crispy_layout_mixin.py b/sapl/crispy_layout_mixin.py index 34c9ecab4..028301502 100644 --- a/sapl/crispy_layout_mixin.py +++ b/sapl/crispy_layout_mixin.py @@ -1,12 +1,12 @@ from math import ceil -import rtyaml from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import HTML, Div, Fieldset, Layout, Submit from django import template from django.utils import formats from django.utils.translation import ugettext as _ +import rtyaml def heads_and_tails(list_of_lists): @@ -91,7 +91,8 @@ def get_field_display(obj, fieldname): else: display = '' elif 'ManyRelatedManager' in str(type(value))\ - or 'RelatedManager' in str(type(value)): + or 'RelatedManager' in str(type(value))\ + or 'GenericRelatedObjectManager' in str(type(value)): display = '