Skip to content

Commit 009c0ba

Browse files
committed
Fixes #4134: Device power ports and outlets should inherit type from the parent device type
1 parent ec53e1c commit 009c0ba

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

docs/release-notes/version-2.7.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* [#4091](https://github.com/netbox-community/netbox/issues/4091) - Fix filtering of objects by custom fields using UI search form
1818
* [#4099](https://github.com/netbox-community/netbox/issues/4099) - Linkify interfaces on global interfaces list
1919
* [#4108](https://github.com/netbox-community/netbox/issues/4108) - Avoid extraneous database queries when rendering search forms
20+
* [#4134](https://github.com/netbox-community/netbox/issues/4134) - Device power ports and outlets should inherit type from the parent device type
2021

2122
---
2223

netbox/dcim/models/device_component_templates.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ def instantiate(self, device):
168168
return PowerPort(
169169
device=device,
170170
name=self.name,
171+
type=self.type,
171172
maximum_draw=self.maximum_draw,
172173
allocated_draw=self.allocated_draw
173174
)
@@ -232,6 +233,7 @@ def instantiate(self, device):
232233
return PowerOutlet(
233234
device=device,
234235
name=self.name,
236+
type=self.type,
235237
power_port=power_port,
236238
feed_leg=self.feed_leg
237239
)

0 commit comments

Comments
 (0)