15106 review comments

This commit is contained in:
Arthur Hanson 2024-06-14 15:47:02 -07:00
parent e63736667c
commit 31ae1daab6

View File

@ -250,15 +250,15 @@ class WirelessLink(WirelessAuthenticationBase, PrimaryModel):
}) })
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
# Store the given length (if any) in meters for use in database ordering # Store the given distance (if any) in meters for use in database ordering
if self.length is not None and self.length_unit: if self.distance is not None and self.distance_unit:
self._abs_distance = to_meters(self.length, self.length_unit) self._abs_distance = to_meters(self.distance, self.distance_unit)
else: else:
self._abs_distance = None self._abs_distance = None
# Clear length_unit if no length is defined # Clear distance_unit if no distance is defined
if self.length is None: if self.distance is None:
self.length_unit = '' self.distance_unit = ''
# Store the parent Device for the A and B interfaces # Store the parent Device for the A and B interfaces
self._interface_a_device = self.interface_a.device self._interface_a_device = self.interface_a.device