mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-29 03:46:25 -06:00
Fixes #3953: Fix validation error when creating child devices
This commit is contained in:
parent
d7a770b528
commit
cea4dffc02
@ -3,6 +3,7 @@
|
|||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
||||||
* [#3951](https://github.com/netbox-community/netbox/issues/3951) - Fix exception in webhook worker due to missing constant
|
* [#3951](https://github.com/netbox-community/netbox/issues/3951) - Fix exception in webhook worker due to missing constant
|
||||||
|
* [#3953](https://github.com/netbox-community/netbox/issues/3953) - Fix validation error when creating child devices
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -1464,7 +1464,7 @@ class Device(ChangeLoggedModel, ConfigContextModel, CustomFieldModel):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
# Child devices cannot be assigned to a rack face/unit
|
# Child devices cannot be assigned to a rack face/unit
|
||||||
if self.device_type.is_child_device and self.face is not None:
|
if self.device_type.is_child_device and self.face:
|
||||||
raise ValidationError({
|
raise ValidationError({
|
||||||
'face': "Child device types cannot be assigned to a rack face. This is an attribute of the "
|
'face': "Child device types cannot be assigned to a rack face. This is an attribute of the "
|
||||||
"parent device."
|
"parent device."
|
||||||
|
Loading…
Reference in New Issue
Block a user