From bef62e430c63df78a40cc45ed4e7fa6b33e1c87a Mon Sep 17 00:00:00 2001 From: 16337 <1633794139@qq.com> Date: Thu, 5 Feb 2026 09:57:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dget=5Fbindings=5Ffrom?= =?UTF-8?q?=5Fredis=E7=A9=BAroi=5Fid=E8=BF=87=E6=BB=A4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当roi_id为空字符串时(reload_all_algorithms调用),原逻辑 data.get('roi_id') == "" 匹配不到任何bind,导致全量重载 始终返回0个算法。改为 not roi_id or 匹配,空值时返回全部。 Co-Authored-By: Claude Opus 4.5 --- core/config_sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/config_sync.py b/core/config_sync.py index a7b8ee5..efc3a77 100644 --- a/core/config_sync.py +++ b/core/config_sync.py @@ -589,7 +589,7 @@ class ConfigSyncManager: results = [] for key in keys: data = self._redis_client.hgetall(key) - if data and data.get('roi_id') == roi_id: + if data and (not roi_id or data.get('roi_id') == roi_id): data['params'] = eval(data['params']) if data.get('params') else {} data['priority'] = int(data.get('priority', 0)) data['enabled'] = data.get('enabled', 'True') == 'True'