diff --git a/agent/app/model/alert.go b/agent/app/model/alert.go index a697a602f..ac364f510 100644 --- a/agent/app/model/alert.go +++ b/agent/app/model/alert.go @@ -18,7 +18,7 @@ type AlertTask struct { Type string `gorm:"type:varchar(64);not null" json:"type"` Quota string `gorm:"type:varchar(64)" json:"quota"` QuotaType string `gorm:"type:varchar(64)" json:"quotaType"` - Method string `gorm:"type:varchar(64);not null;default:'sms" json:"method"` + Method string `gorm:"type:varchar(64);not null;default:'sms'" json:"method"` } type AlertLog struct { @@ -33,7 +33,7 @@ type AlertLog struct { Message string `gorm:"type:varchar(256);" json:"message"` RecordId uint `gorm:"type:integer;" json:"recordId"` LicenseId string `gorm:"type:varchar(256);not null;" json:"licenseId" ` - Method string `gorm:"type:varchar(64);not null;default:'sms" json:"method"` + Method string `gorm:"type:varchar(64);not null;default:'sms'" json:"method"` } type AlertConfig struct { diff --git a/agent/utils/version/version.go b/agent/utils/version/version.go index b0951771f..2da2f3721 100644 --- a/agent/utils/version/version.go +++ b/agent/utils/version/version.go @@ -130,10 +130,6 @@ func loadVersion(isLatest bool, currentVersion, mode string) string { return "" } num, _ := strconv.Atoi(versionPart[1]) - if num == 0 { - global.LOG.Errorf("current version is error format: %s", currentVersion) - return "" - } if num >= 10 { if version, ok := versionMap[currentVersion[0:5]]; ok { return checkVersion(version, currentVersion)