mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #4895: Force UTF-8 encoding when embedding model documentation
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
A power feed identifies the power outlet/drop that goes to a rack and is terminated to a power panel. Power feeds have a supply type (AC/DC), voltage, amperage, and phase type (single/three).
|
A power feed identifies the power outlet/drop that goes to a rack and is terminated to a power panel. Power feeds have a supply type (AC/DC), voltage, amperage, and phase type (single/three).
|
||||||
|
|
||||||
Power feeds are optionally assigned to a rack. In addition, a power port – and only one – can connect to a power feed; in the context of a PDU, the power feed is analogous to the power outlet that a PDU's power port/inlet connects to.
|
Power feeds are optionally assigned to a rack. In addition, a power port may be connected to a power feed. In the context of a PDU, the power feed is analogous to the power outlet that a PDU's power port/inlet connects to.
|
||||||
|
|
||||||
!!! info
|
!!! info
|
||||||
The power usage of a rack is calculated when a power feed (or multiple) is assigned to that rack and connected to a power port.
|
The power usage of a rack is calculated when a power feed (or multiple) is assigned to that rack and connected to a power port.
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
* [#4880](https://github.com/netbox-community/netbox/issues/4880) - Fix removal of tagged VLANs if not assigned in bulk interface editing
|
* [#4880](https://github.com/netbox-community/netbox/issues/4880) - Fix removal of tagged VLANs if not assigned in bulk interface editing
|
||||||
* [#4887](https://github.com/netbox-community/netbox/issues/4887) - Don't disable NAPALM tabs when device has no primary IP
|
* [#4887](https://github.com/netbox-community/netbox/issues/4887) - Don't disable NAPALM tabs when device has no primary IP
|
||||||
* [#4894](https://github.com/netbox-community/netbox/issues/4894) - Fix display of device/VM counts on platforms list
|
* [#4894](https://github.com/netbox-community/netbox/issues/4894) - Fix display of device/VM counts on platforms list
|
||||||
|
* [#4895](https://github.com/netbox-community/netbox/issues/4895) - Force UTF-8 encoding when embedding model documentation
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ def get_docs(model):
|
|||||||
model._meta.model_name
|
model._meta.model_name
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
with open(path) as docfile:
|
with open(path, encoding='utf-8') as docfile:
|
||||||
content = docfile.read()
|
content = docfile.read()
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
return "Unable to load documentation, file not found: {}".format(path)
|
return "Unable to load documentation, file not found: {}".format(path)
|
||||||
|
Reference in New Issue
Block a user