mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
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