Explorar el Código

Closes #8848: Show module bay & type in API serilizer display

jeremystretch hace 4 años
padre
commit
2101f714cc
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      netbox/dcim/models/devices.py

+ 1 - 1
netbox/dcim/models/devices.py

@@ -1049,7 +1049,7 @@ class Module(NetBoxModel, ConfigContextModel):
         ordering = ('module_bay',)
 
     def __str__(self):
-        return str(self.module_type)
+        return f'{self.module_bay.name}: {self.module_type} ({self.pk})'
 
     def get_absolute_url(self):
         return reverse('dcim:module', args=[self.pk])