mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #18115 from ioito/automated-cherry-pick-of-#18114-upstream-release-3.11
Automated cherry pick of #18114: fix(region): network update detail error
This commit is contained in:
@@ -1737,9 +1737,8 @@ func (self *SNetwork) validateUpdateData(ctx context.Context, userCred mcclient.
|
||||
|
||||
usedMap := self.GetUsedAddresses()
|
||||
for usedIpStr := range usedMap {
|
||||
usedIp, _ := netutils.NewIPV4Addr(usedIpStr)
|
||||
if !netRange.Contains(usedIp) {
|
||||
return input, httperrors.NewInputParameterError("Address been assigned out of new range")
|
||||
if usedIp, err := netutils.NewIPV4Addr(usedIpStr); err == nil && !netRange.Contains(usedIp) {
|
||||
return input, httperrors.NewInputParameterError("Address %s been assigned out of new range", usedIpStr)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user