From 21091a2a045c4e61a55dbeb9f83713670f507d9c Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Fri, 24 Jan 2025 16:06:11 +0200 Subject: [PATCH] Fix in case secret or check period is null --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 3021276..1887cab 100644 --- a/main.go +++ b/main.go @@ -135,8 +135,8 @@ func getAgents(db *sql.DB) ([]Agent, error) { sql := `SELECT ja.id, ja.url, - ja.secret_key, - ja.check_period, + COALESCE(ja.secret_key, '') AS secret_key, + COALESCE(ja.check_period, 0) AS check_period, jat.endpoint FROM jilo_agents ja