1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
This commit is contained in:
Jeremy Stretch
2017-07-25 10:58:28 -04:00
parent 1770c85689
commit 7476194bd1

View File

@ -69,7 +69,7 @@ def example_choices(field, arg=3):
"""
examples = []
if hasattr(field, 'queryset'):
choices = [(obj.pk, getattr(obj, field.to_field_name)) for obj in field.queryset[:arg+1]]
choices = [(obj.pk, getattr(obj, field.to_field_name)) for obj in field.queryset[:arg + 1]]
else:
choices = field.choices
for id, label in choices: