Skip to content

Commit

Permalink
Assign the default cable length unit when not present (#206)
Browse files Browse the repository at this point in the history
Bug: Failing to assign the default cable length unit when not present.
It was introduced in #198.

Fix: Test the correct cable attribute. This fix solves issue #205.
  • Loading branch information
kvid committed Dec 29, 2020
1 parent 606ddbf commit da56841
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wireviz/DataClasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def __post_init__(self) -> None:
self.length_unit = u
elif not any(isinstance(self.length, t) for t in [int, float]):
raise Exception(f'Cable {self.name} length has a non-numeric value')
elif self.gauge_unit is None:
elif self.length_unit is None:
self.length_unit = 'm'

self.connections = []
Expand Down

0 comments on commit da56841

Please sign in to comment.