mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-27 10:58:37 -06:00
Closes #17832: Don't validate terminations on Cable instance when importing from serialzied data
This commit is contained in:
parent
b7ae13af82
commit
4aee0a6a1b
@ -164,7 +164,7 @@ class Cable(PrimaryModel):
|
|||||||
if self.length is not None and not self.length_unit:
|
if self.length is not None and not self.length_unit:
|
||||||
raise ValidationError(_("Must specify a unit when setting a cable length"))
|
raise ValidationError(_("Must specify a unit when setting a cable length"))
|
||||||
|
|
||||||
if self._state.adding and (not self.a_terminations or not self.b_terminations):
|
if self._state.adding and self.pk is None and (not self.a_terminations or not self.b_terminations):
|
||||||
raise ValidationError(_("Must define A and B terminations when creating a new cable."))
|
raise ValidationError(_("Must define A and B terminations when creating a new cable."))
|
||||||
|
|
||||||
if self._terminations_modified:
|
if self._terminations_modified:
|
||||||
|
Loading…
Reference in New Issue
Block a user