mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Improve ChoiceFieldColumn to not rely on model method to derive label color
This commit is contained in:
@@ -322,9 +322,6 @@ class VirtualMachine(NetBoxModel, ConfigContextModel):
|
||||
field: f"The specified IP address ({ip}) is not assigned to this VM.",
|
||||
})
|
||||
|
||||
def get_status_class(self):
|
||||
return VirtualMachineStatusChoices.colors.get(self.status, 'secondary')
|
||||
|
||||
@property
|
||||
def primary_ip(self):
|
||||
if get_config().PREFER_IPV4 and self.primary_ip4:
|
||||
|
Reference in New Issue
Block a user