From e2e58530b26bb603875d311dea73428c434f1e24 Mon Sep 17 00:00:00 2001 From: Hemna Date: Mon, 1 Apr 2024 21:55:00 -0400 Subject: [PATCH] Fixed issues with watch list at startup --- aprsd/packets/watch_list.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/aprsd/packets/watch_list.py b/aprsd/packets/watch_list.py index 2b17d61..713200f 100644 --- a/aprsd/packets/watch_list.py +++ b/aprsd/packets/watch_list.py @@ -97,14 +97,19 @@ class WatchList(objectstore.ObjectStoreMixin): We put this here so any notification plugin can use this same test. """ + if not self.callsign_in_watchlist(callsign): + return False + age = self.age(callsign) + if age: + delta = utils.parse_delta_str(age) + d = datetime.timedelta(**delta) - delta = utils.parse_delta_str(age) - d = datetime.timedelta(**delta) + max_delta = self.max_delta(seconds=seconds) - max_delta = self.max_delta(seconds=seconds) - - if d > max_delta: - return True + if d > max_delta: + return True + else: + return False else: return False