mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 12:12:53 -06:00
Closes #8848: Show module bay & type in API serilizer display
This commit is contained in:
parent
f2079de2cb
commit
2101f714cc
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user