Просмотр исходного кода

TenantColumn should export null if no tenant is assigned

jeremystretch 4 лет назад
Родитель
Сommit
0a1531ce8a
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      netbox/tenancy/tables.py

+ 1 - 1
netbox/tenancy/tables.py

@@ -26,7 +26,7 @@ class TenantColumn(tables.TemplateColumn):
         super().__init__(template_code=self.template_code, *args, **kwargs)
 
     def value(self, value):
-        return str(value)
+        return str(value) if value else None
 
 
 #