aops-zeus/0005-fix-apollo-TimedCorrectTask.patch
rabbitali 0d291ac9ef update verification method for adding host or updating host info
(cherry picked from commit fdb77fbb9208fc1aa836176b45f1f69ec2a4e737)
2023-12-19 11:57:58 +08:00

28 lines
801 B
Diff

From cb3af79a8237c6b7e083dc8ba7d324bddf395e08 Mon Sep 17 00:00:00 2001
From: rearcher <123781007@qq.com>
Date: Tue, 19 Dec 2023 10:59:30 +0800
Subject: [PATCH] fix apollo TimedCorrectTask
---
zeus/database/proxy/host.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/zeus/database/proxy/host.py b/zeus/database/proxy/host.py
index 441ef21..471390e 100644
--- a/zeus/database/proxy/host.py
+++ b/zeus/database/proxy/host.py
@@ -372,7 +372,9 @@ class HostProxy(MysqlProxy):
Host.pkey,
Host.ssh_user,
]
- filters = {Host.user == username}
+ filters = set()
+ if username:
+ filters = {Host.user == username}
if host_list:
filters.add(Host.host_id.in_(host_list))
try:
--
2.33.0