From 599216790980a7ad0dda4fe0bb4449d30b0aee28 Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Tue, 29 Jul 2025 10:33:59 +1200 Subject: [PATCH] Fix comparing int with None --- sbysrc/sby_status.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sbysrc/sby_status.py b/sbysrc/sby_status.py index f608b18..846597b 100644 --- a/sbysrc/sby_status.py +++ b/sbysrc/sby_status.py @@ -476,7 +476,10 @@ class SbyStatusDb: # no depth or kind to compare, just take latest data update_map = True elif this_depth is not None and this_depth != current_depth: - if status == 'FAIL' and this_depth < current_depth: + if current_depth is None: + # always prefer a known depth to an unknown + update_map = True + elif status == 'FAIL' and this_depth < current_depth: # earliest fail update_map = True elif status != 'FAIL' and this_depth > current_depth: