mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-23 16:11:24 +01:00
Merge pull request #7194 from stonezdj/remove_error_msg
Remove error message of saving system setting to db
This commit is contained in:
commit
855c0a2a6e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user