mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
Merge pull request #388 in YUNIONIO/onecloud from ~WANYAOQI/onecloud:bugfix/wyq/misc-2018-1030 to release/2.3.0
* commit '2874b808d89894fee0e8756a93bdb8ac72083d3a': fix perform action call allowfunc
This commit is contained in:
@@ -1034,7 +1034,7 @@ func objectPerformAction(dispatcher *DBModelDispatcher, model IModel, modelValue
|
||||
return nil, httperrors.NewActionNotFoundError(msg)
|
||||
}
|
||||
|
||||
outs := funcValue.Call(params)
|
||||
outs := allowFuncValue.Call(params)
|
||||
if len(outs) != 1 {
|
||||
return nil, httperrors.NewInternalServerError("Invald %s return value", allowFuncName)
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ func (self *SSnapshot) getMoreDetails(extra *jsonutils.JSONDict) *jsonutils.JSON
|
||||
}
|
||||
disk, _ := self.GetDisk()
|
||||
if disk != nil {
|
||||
// extra.Add(jsonutils.NewString(disk.DiskType), "disk_type")
|
||||
extra.Add(jsonutils.NewString(disk.Status), "disk_status")
|
||||
guests := disk.GetGuests()
|
||||
if len(guests) == 1 {
|
||||
extra.Add(jsonutils.NewString(guests[0].Name), "guest")
|
||||
|
||||
Reference in New Issue
Block a user