Commit 16e6bc44 authored by 凡羊羊's avatar 凡羊羊
Browse files

[FIX] fix issue bug(#330) check if nil or not before use config

Showing with 5 additions and 3 deletions
+5 -3
......@@ -128,9 +128,11 @@ func conversionServicePlugin(as *typesv1.AppService, dbmanager db.Manager) ([]v1
if err != nil && err != gorm.ErrRecordNotFound {
logrus.Errorf("get service plugin config from db failure %s", err.Error())
}
var resourceConfig api_model.ResourceSpec
if err := json.Unmarshal([]byte(config.ConfigStr), &resourceConfig); err == nil {
inboundPluginConfig = &resourceConfig
if config != nil {
var resourceConfig api_model.ResourceSpec
if err := json.Unmarshal([]byte(config.ConfigStr), &resourceConfig); err == nil {
inboundPluginConfig = &resourceConfig
}
}
}
//create plugin config to configmap
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment