From f03b611483b251ac408bd0d368bdb9f64543c69c Mon Sep 17 00:00:00 2001 From: Michael Mraka Date: Mon, 15 Apr 2024 14:37:38 +0200 Subject: [PATCH] RHINENG-8045: fix sql: Scan error on column index 0, name \"creator\": converting NULL to string is unsupported --- manager/controllers/templates.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manager/controllers/templates.go b/manager/controllers/templates.go index b38d78ebf..b62753a2c 100644 --- a/manager/controllers/templates.go +++ b/manager/controllers/templates.go @@ -161,7 +161,7 @@ func templatesCreators(db *gorm.DB, account int) ([]*string, error) { err := db.Table("template bl"). Distinct("creator"). Joins("JOIN rh_account acc ON bl.rh_account_id = acc.id"). - Where("bl.rh_account_id = ?", account). + Where("bl.rh_account_id = ? and creator IS NOT NULL", account). Scan(&creators).Error if err != nil { return nil, err