Fix nullable ip_address in mikrotik (#76197)

This commit is contained in:
Rami Mosleh 2022-08-04 17:04:12 +03:00 committed by GitHub
parent 8793cf4996
commit ff255fedda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -116,7 +116,7 @@ class MikrotikDataUpdateCoordinatorTracker(
return self.device.mac
@property
def ip_address(self) -> str:
def ip_address(self) -> str | None:
"""Return the mac address of the client."""
return self.device.ip_address

View file

@ -60,9 +60,9 @@ class Device:
return self._params.get("host-name", self.mac)
@property
def ip_address(self) -> str:
def ip_address(self) -> str | None:
"""Return device primary ip address."""
return self._params["address"]
return self._params.get("address")
@property
def mac(self) -> str: