diff --git a/sapl/crispy_layout_mixin.py b/sapl/crispy_layout_mixin.py index 028301502..555a04f19 100644 --- a/sapl/crispy_layout_mixin.py +++ b/sapl/crispy_layout_mixin.py @@ -61,8 +61,12 @@ def get_field_display(obj, fieldname): try: field = obj._meta.get_field(fieldname) except: - value = getattr(obj, fieldname) - return '', str(value) + field = getattr(obj, fieldname) + if 'ManyRelatedManager' not in str(type(field))\ + and 'RelatedManager' not in str(type(field))\ + and 'GenericRelatedObjectManager' not in str(type(field)): + return '', str(field) + verbose_name = str(field.verbose_name)\ if hasattr(field, 'verbose_name') else '' if hasattr(field, 'choices') and field.choices: @@ -98,7 +102,11 @@ def get_field_display(obj, fieldname): display += '