Merge pull request #23057 from netbox-community/22991-optimize-modulebaytype-queries

Closes #22991: Omit manufacturer from ModuleBayType representation
This commit is contained in:
bctiemann 2026-08-27 18:14:34 -04:00 committed by GitHub
commit a8626a517f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -78,6 +78,10 @@ class ModuleBayType(PrimaryModel):
verbose_name_plural = _('module bay types')
def __str__(self):
return self.name
@property
def full_name(self):
if self.manufacturer:
return f'{self.manufacturer} {self.name}'
return self.name