mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-28 03:23:25 +08:00
Merge pull request #25 in YUNIONIO/onecloud from ~QIUJIAN/onecloud:hotfix/qj-misc-bugfix-20180808 to release/2.0.0
* commit '1585d24302c5f0bfe28f769ad2aeef86a8afed9c': 修正:阿里云回收站主机恢复后无系统盘 修正:1. 删除VPC导致hostwire数据不一致问题 2. 阿里云主机无操作系统信息 3. 其他一些BUGfix temp commit temporary commit
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"github.com/yunionio/log"
|
||||
|
||||
"github.com/yunionio/onecloud/pkg/cloudcommon/db"
|
||||
"database/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -37,7 +38,9 @@ func (manager *SSubTaskmanager) GetSubTask(ptaskId string, subtaskId string) *SS
|
||||
subtask := SSubTask{}
|
||||
err := manager.Query().Equals("task_id", ptaskId).Equals("subtask_id", subtaskId).First(&subtask)
|
||||
if err != nil {
|
||||
log.Errorf("GetSubTask fail %s", err)
|
||||
if err != sql.ErrNoRows {
|
||||
log.Errorf("GetSubTask fail %s", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return &subtask
|
||||
|
||||
@@ -256,6 +256,10 @@ func (model *SVirtualResourceBase) AllowPerformCancelDelete(ctx context.Context,
|
||||
return false
|
||||
}
|
||||
|
||||
/*func DoCancelPendingDelete(model IVirtualModel, ctx context.Context, userCred mcclient.TokenCredential) error {
|
||||
return model.DoCancelPendingDelete(ctx, userCred)
|
||||
}*/
|
||||
|
||||
func (model *SVirtualResourceBase) PerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error) {
|
||||
if model.PendingDeleted {
|
||||
err := model.DoCancelPendingDelete(ctx, userCred)
|
||||
|
||||
Reference in New Issue
Block a user