fix: avoid region2 panic when update openstack storage

This commit is contained in:
ioito
2019-07-30 20:49:31 +08:00
parent ab5bd948d5
commit 14e68f11f2
2 changed files with 1 additions and 3 deletions
-2
View File
@@ -18,7 +18,6 @@ import (
"context"
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/onecloud/pkg/cloudcommon/db/taskman"
"yunion.io/x/onecloud/pkg/mcclient"
@@ -50,6 +49,5 @@ func GetStorageDriver(storageType string) IStorageDriver {
if ok {
return driver
}
log.Fatalf("Unsupported storageType %s", storageType)
return nil
}
+1 -1
View File
@@ -108,7 +108,7 @@ func (self *SStorage) ValidateUpdateData(ctx context.Context, userCred mcclient.
if driver != nil {
return driver.ValidateUpdateData(ctx, userCred, data, self)
}
return nil, nil
return data, nil
}
func (self *SStorage) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) {