mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
13757 Fix ConfigContext reference to DeviceType (#13804)
* 13757 do prefetch to work around Django issue with vars in init (DeviceType) * 13757 use self.__dict to access vars in init * 13757 change test
This commit is contained in:
@@ -290,8 +290,8 @@ class Prefix(GetAvailablePrefixesMixin, PrimaryModel):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
# Cache the original prefix and VRF so we can check if they have changed on post_save
|
||||
self._prefix = self.prefix
|
||||
self._vrf_id = self.vrf_id
|
||||
self._prefix = self.__dict__.get('prefix')
|
||||
self._vrf_id = self.__dict__.get('vrf_id')
|
||||
|
||||
def __str__(self):
|
||||
return str(self.prefix)
|
||||
|
Reference in New Issue
Block a user