--- a/src/pyams_utils/__init__.py Fri Jun 28 15:40:27 2019 +0200
+++ b/src/pyams_utils/__init__.py Fri Jun 28 15:40:59 2019 +0200
@@ -29,10 +29,11 @@
def get_field_doc(self):
"""Try to get FieldProperty field docstring from field interface"""
field = self._FieldProperty__field
- if field.title and field.description:
- return '{0}: {1}'.format(field.title, field.description)
- elif field.title:
- return field.title
+ if field.title:
+ if field.description:
+ return '{0}: {1}'.format(field.title, field.description)
+ else:
+ return field.title
else:
return super(self.__class__, self).__doc__