We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1753c0 commit 282dc7aCopy full SHA for 282dc7a
netbox/netbox/search/__init__.py
@@ -59,9 +59,10 @@ def get_field_type(instance, field_name):
59
@staticmethod
60
def get_field_value(instance, field_name):
61
"""
62
- Return the value of the specified model field as a string.
+ Return the value of the specified model field as a string (or None).
63
64
- return str(getattr(instance, field_name))
+ if value := getattr(instance, field_name):
65
+ return str(value)
66
67
@classmethod
68
def get_category(cls):
0 commit comments