1
0
mirror of https://github.com/craigerl/aprsd.git synced 2024-11-18 06:11:49 -05:00

Fixed issues with watch list at startup

This commit is contained in:
Hemna 2024-04-01 21:55:00 -04:00
parent 01cd0a0327
commit e2e58530b2

View File

@ -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