From c5e6320fa6182f51129bc492861ada500a72e04c Mon Sep 17 00:00:00 2001 From: Lukas Juhrich Date: Tue, 20 Sep 2022 13:17:21 +0200 Subject: [PATCH] Add missing definition of variable Relates to python/mypy#13696 --- src/hades/agent/tasks.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hades/agent/tasks.py b/src/hades/agent/tasks.py index 870572f4..e82722fb 100644 --- a/src/hades/agent/tasks.py +++ b/src/hades/agent/tasks.py @@ -319,8 +319,7 @@ def get_auth_attempts_at_port( """ nas_ip_address = check_ip_address("nas_ip_address", nas_ip_address) nas_port_id = check_str("nas_port_id", nas_port_id) - if when is not None: - safe_when = check_timestamp_range("until", when) + safe_when = check_timestamp_range("until", when) if when is not None else None if limit is not None: limit = check_positive_int("limit", limit) with contextlib.closing(engine.connect()) as connection: