mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: fail to update isolated_devices of type USB
This commit is contained in:
@@ -186,7 +186,7 @@ func (self *SIsolatedDevice) ValidateUpdateData(
|
||||
if input.ReservedStorage != nil && *input.ReservedStorage < 0 {
|
||||
return input, httperrors.NewInputParameterError("reserved storage must >= 0")
|
||||
}
|
||||
if input.DevType != "" {
|
||||
if input.DevType != "" && input.DevType != self.DevType {
|
||||
if !utils.IsInStringArray(input.DevType, api.VALID_GPU_TYPES) {
|
||||
return input, httperrors.NewInputParameterError("device type %q not support update", input.DevType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user