mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
Custom fields - removed the debug lines
This commit is contained in:
parent
db38ed4f19
commit
7141fc8eb0
@ -429,7 +429,7 @@ class CustomFieldColumn(tables.Column):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def _likify_item(item):
|
def _likify_item(item):
|
||||||
if hasattr(item, 'get_absolute_url'):
|
if hasattr(item, 'get_absolute_url'):
|
||||||
return f'<a href="{item.get_absolute_url()}">{item}</a>'
|
return f'<a href="{item.get_absolute_url()}">{escape(item)}</a>'
|
||||||
return escape(item)
|
return escape(item)
|
||||||
|
|
||||||
def render(self, value):
|
def render(self, value):
|
||||||
@ -442,9 +442,6 @@ class CustomFieldColumn(tables.Column):
|
|||||||
if self.customfield.type == CustomFieldTypeChoices.TYPE_MULTISELECT:
|
if self.customfield.type == CustomFieldTypeChoices.TYPE_MULTISELECT:
|
||||||
return ', '.join(v for v in value)
|
return ', '.join(v for v in value)
|
||||||
if self.customfield.type == CustomFieldTypeChoices.TYPE_MULTIOBJECT:
|
if self.customfield.type == CustomFieldTypeChoices.TYPE_MULTIOBJECT:
|
||||||
print (mark_safe(', '.join([
|
|
||||||
self._likify_item(obj) for obj in self.customfield.deserialize(value)
|
|
||||||
])))
|
|
||||||
return mark_safe(', '.join([
|
return mark_safe(', '.join([
|
||||||
self._likify_item(obj) for obj in self.customfield.deserialize(value)
|
self._likify_item(obj) for obj in self.customfield.deserialize(value)
|
||||||
]))
|
]))
|
||||||
|
Loading…
Reference in New Issue
Block a user