From 588bdeb1d1655ab57480dd77954e1d4350a74d76 Mon Sep 17 00:00:00 2001 From: Eduardo Calil Date: Mon, 7 Aug 2017 13:39:07 -0300 Subject: [PATCH] Fix #1286 (#1349) --- sapl/crispy_layout_mixin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sapl/crispy_layout_mixin.py b/sapl/crispy_layout_mixin.py index 29cd7849f..e46a193e1 100644 --- a/sapl/crispy_layout_mixin.py +++ b/sapl/crispy_layout_mixin.py @@ -67,7 +67,10 @@ def get_field_display(obj, fieldname): ou mesmo uma método no model. """ value = getattr(obj, fieldname) - verbose_name = '' + try: + verbose_name = value.model._meta.verbose_name + except AttributeError: + verbose_name = '' else: verbose_name = str(field.verbose_name)\