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

This commit is contained in:
jeremystretch 2022-03-14 14:06:14 -04:00
parent f2079de2cb
commit 2101f714cc

View File

@ -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])