mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Remove deprecated display_name() methods from models
This commit is contained in:
@@ -172,7 +172,7 @@ class VLAN(PrimaryModel):
|
||||
verbose_name_plural = 'VLANs'
|
||||
|
||||
def __str__(self):
|
||||
return self.display_name or super().__str__()
|
||||
return f'{self.name} ({self.vid})'
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse('ipam:vlan', args=[self.pk])
|
||||
@@ -199,10 +199,6 @@ class VLAN(PrimaryModel):
|
||||
self.description,
|
||||
)
|
||||
|
||||
@property
|
||||
def display_name(self):
|
||||
return f'{self.name} ({self.vid})'
|
||||
|
||||
def get_status_class(self):
|
||||
return VLANStatusChoices.CSS_CLASSES.get(self.status)
|
||||
|
||||
|
Reference in New Issue
Block a user