mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-27 10:58:37 -06:00
Don't cache device label
Generating the device label doesn't require much computing power. Thus, caching does more harm than good, as it may return stale labels after name changes. Now a fresh label is always generated.
This commit is contained in:
parent
4692b9f955
commit
650ed0e643
@ -1069,7 +1069,7 @@ class Device(
|
||||
device.location = self.location
|
||||
device.save()
|
||||
|
||||
@cached_property
|
||||
@property
|
||||
def label(self):
|
||||
"""
|
||||
Return the device name if set; otherwise return a generated name if available.
|
||||
|
Loading…
Reference in New Issue
Block a user