diff --git a/features/cm/software.go b/features/cm/software.go index 87c3a18e..98b8fe79 100644 --- a/features/cm/software.go +++ b/features/cm/software.go @@ -213,6 +213,14 @@ func UploadSoftwareMultiFile(w http.ResponseWriter, r *http.Request) { services.ResponseNotFound404UriNotExist(w, r) return } + + sql := fmt.Sprintf("select * from ne_software where ne_type='%s' and version='%s'", neTypeUpper, version) + neSoftwareInfo, _ := dborm.XormGetDataBySQL(sql) + if len(*neSoftwareInfo) >= 1 { + services.ResponseInternalServerError500ProcessError(w, fmt.Errorf("ne_software version has exits")) + return + } + md5Param := services.GetUriParamString(r, "md5Sum", ",", false, false) softwarePath := fmt.Sprintf("%s/%s", config.GetYamlConfig().OMC.Software, neTypeLower)