mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #15292: Remove obsolete device_role attribute from Device model
This commit is contained in:
@ -815,20 +815,6 @@ class Device(
|
||||
def get_absolute_url(self):
|
||||
return reverse('dcim:device', args=[self.pk])
|
||||
|
||||
@property
|
||||
def device_role(self):
|
||||
"""
|
||||
For backwards compatibility with pre-v3.6 code expecting a device_role to be present on Device.
|
||||
"""
|
||||
return self.role
|
||||
|
||||
@device_role.setter
|
||||
def device_role(self, value):
|
||||
"""
|
||||
For backwards compatibility with pre-v3.6 code expecting a device_role to be present on Device.
|
||||
"""
|
||||
self.role = value
|
||||
|
||||
def clean(self):
|
||||
super().clean()
|
||||
|
||||
|
Reference in New Issue
Block a user