Merge pull request #7194 from stonezdj/remove_error_msg

Remove error message of saving system setting to db
This commit is contained in:
Wenkai Yin 2019-04-09 12:02:17 +08:00 committed by GitHub
commit 855c0a2a6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -15,13 +15,14 @@
package driver
import (
"os"
"github.com/goharbor/harbor/src/common/config/encrypt"
"github.com/goharbor/harbor/src/common/config/metadata"
"github.com/goharbor/harbor/src/common/dao"
"github.com/goharbor/harbor/src/common/models"
"github.com/goharbor/harbor/src/common/utils"
"github.com/goharbor/harbor/src/common/utils/log"
"os"
)
// Database - Used to load/save configuration in database
@ -63,7 +64,7 @@ func (d *Database) Save(cfgs map[string]interface{}) error {
for key, value := range cfgs {
if item, ok := metadata.Instance().GetByName(key); ok {
if os.Getenv("UTTEST") != "true" && item.Scope == metadata.SystemScope {
log.Errorf("system setting can not updated, key %v", key)
// skip to save system setting to db
continue
}
strValue := utils.GetStrValueOfAnyType(value)