From 31ae1daab6f69635ff8c98e88090a33054a033c6 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Date: Fri, 14 Jun 2024 15:47:02 -0700 Subject: [PATCH] 15106 review comments --- netbox/wireless/models.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/netbox/wireless/models.py b/netbox/wireless/models.py index 9c5917544..4ba689bb3 100644 --- a/netbox/wireless/models.py +++ b/netbox/wireless/models.py @@ -250,15 +250,15 @@ class WirelessLink(WirelessAuthenticationBase, PrimaryModel): }) def save(self, *args, **kwargs): - # Store the given length (if any) in meters for use in database ordering - if self.length is not None and self.length_unit: - self._abs_distance = to_meters(self.length, self.length_unit) + # Store the given distance (if any) in meters for use in database ordering + if self.distance is not None and self.distance_unit: + self._abs_distance = to_meters(self.distance, self.distance_unit) else: self._abs_distance = None - # Clear length_unit if no length is defined - if self.length is None: - self.length_unit = '' + # Clear distance_unit if no distance is defined + if self.distance is None: + self.distance_unit = '' # Store the parent Device for the A and B interfaces self._interface_a_device = self.interface_a.device