Explicitly use the value of the choice, instead of relying on __str__

This commit is contained in:
Saria Hajjar
2020-01-23 17:37:51 +00:00
parent 0ab19d723d
commit 0a5eecd0e3
2 changed files with 1 additions and 4 deletions

View File

@@ -149,9 +149,6 @@ def example_choices(field, arg=3):
break
if not value or not label:
continue
# Handling for custom fields
if hasattr(label, 'value'):
label = label.value
examples.append(label)
return ', '.join(examples) or 'None'