Allow for null cable_position

This commit is contained in:
Jeremy Stretch 2025-12-01 11:48:20 -05:00
parent 463f37ae04
commit a3909d5c48

View File

@ -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.")