This commit is contained in:
UlricQin 2021-12-02 17:37:42 +08:00
parent 270d3b7e5b
commit 79401183ca
1 changed files with 1 additions and 1 deletions

View File

@ -292,7 +292,7 @@ func AlertRuleGetById(id int64) (*AlertRule, error) {
func AlertRuleGetName(id int64) (string, error) {
var names []string
err := DB().Where("id = ?", id).Pluck("name", &names).Error
err := DB().Model(new(AlertRule)).Where("id = ?", id).Pluck("name", &names).Error
if err != nil {
return "", err
}