mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-15 12:59:35 -06:00
Allow for null cable_position
This commit is contained in:
parent
463f37ae04
commit
a3909d5c48
@ -210,10 +210,6 @@ class CabledObjectModel(models.Model):
|
|||||||
raise ValidationError({
|
raise ValidationError({
|
||||||
"cable_end": _("Must specify cable end (A or B) when attaching a cable.")
|
"cable_end": _("Must specify cable end (A or B) when attaching a cable.")
|
||||||
})
|
})
|
||||||
if not self.cable_position:
|
|
||||||
raise ValidationError({
|
|
||||||
"cable_position": _("Must specify cable termination position when attaching a cable.")
|
|
||||||
})
|
|
||||||
if self.cable_end and not self.cable:
|
if self.cable_end and not self.cable:
|
||||||
raise ValidationError({
|
raise ValidationError({
|
||||||
"cable_end": _("Cable end must not be set without a cable.")
|
"cable_end": _("Cable end must not be set without a cable.")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user