mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-25 10:07:43 +01:00
Remove error message of saving system setting to db
Signed-off-by: stonezdj <stonezdj@gmail.com>
This commit is contained in:
parent
204c139dbd
commit
e8ab7156bc
@ -15,13 +15,14 @@
|
|||||||
package driver
|
package driver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
"github.com/goharbor/harbor/src/common/config/encrypt"
|
"github.com/goharbor/harbor/src/common/config/encrypt"
|
||||||
"github.com/goharbor/harbor/src/common/config/metadata"
|
"github.com/goharbor/harbor/src/common/config/metadata"
|
||||||
"github.com/goharbor/harbor/src/common/dao"
|
"github.com/goharbor/harbor/src/common/dao"
|
||||||
"github.com/goharbor/harbor/src/common/models"
|
"github.com/goharbor/harbor/src/common/models"
|
||||||
"github.com/goharbor/harbor/src/common/utils"
|
"github.com/goharbor/harbor/src/common/utils"
|
||||||
"github.com/goharbor/harbor/src/common/utils/log"
|
"github.com/goharbor/harbor/src/common/utils/log"
|
||||||
"os"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Database - Used to load/save configuration in database
|
// 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 {
|
for key, value := range cfgs {
|
||||||
if item, ok := metadata.Instance().GetByName(key); ok {
|
if item, ok := metadata.Instance().GetByName(key); ok {
|
||||||
if os.Getenv("UTTEST") != "true" && item.Scope == metadata.SystemScope {
|
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
|
continue
|
||||||
}
|
}
|
||||||
strValue := utils.GetStrValueOfAnyType(value)
|
strValue := utils.GetStrValueOfAnyType(value)
|
||||||
|
Loading…
Reference in New Issue
Block a user