1
0
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:
Arthur Hanson
2023-09-20 06:56:52 -07:00
committed by GitHub
parent 35bcc2ce9d
commit 8e251ac33c
7 changed files with 16 additions and 14 deletions

View File

@ -219,7 +219,7 @@ class CustomField(CloningMixin, ExportTemplatesMixin, ChangeLoggedModel):
super().__init__(*args, **kwargs)
# Cache instance's original name so we can check later whether it has changed
self._name = self.name
self._name = self.__dict__.get('name')
@property
def search_type(self):