Fixes #4438: Fix exception when disconnecting a cable from a power feed

This commit is contained in:
Jeremy Stretch 2020-04-02 10:19:50 -04:00
parent 354f87c888
commit 4ab3854d66
2 changed files with 5 additions and 0 deletions

View File

@ -9,6 +9,7 @@
### Bug Fixes ### Bug Fixes
* [#4418](https://github.com/netbox-community/netbox/issues/4418) - Fail cleanly when trying to import multiple device types simultaneously * [#4418](https://github.com/netbox-community/netbox/issues/4418) - Fail cleanly when trying to import multiple device types simultaneously
* [#4438](https://github.com/netbox-community/netbox/issues/4438) - Fix exception when disconnecting a cable from a power feed
* [#4439](https://github.com/netbox-community/netbox/issues/4439) - Tweak display of unset custom integer fields * [#4439](https://github.com/netbox-community/netbox/issues/4439) - Tweak display of unset custom integer fields
--- ---

View File

@ -1905,6 +1905,10 @@ class PowerFeed(ChangeLoggedModel, CableTermination, CustomFieldModel):
super().save(*args, **kwargs) super().save(*args, **kwargs)
@property
def parent(self):
return self.power_panel
def get_type_class(self): def get_type_class(self):
return self.TYPE_CLASS_MAP.get(self.type) return self.TYPE_CLASS_MAP.get(self.type)