mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-28 03:23:25 +08:00
fix: user show nil map panic (#17875)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
@@ -660,7 +660,9 @@ func (manager *SUserManager) FetchScopeResources(userIds []string) (map[string]a
|
||||
ExtResourcesNextUpdate: res.LastUpdate.Add(time.Duration(options.Options.FetchScopeResourceCountIntervalSeconds) * time.Second),
|
||||
}
|
||||
}
|
||||
result[res.OwnerId].ExtResource[res.Resource] = res.ResCount
|
||||
if res.ResCount > 0 {
|
||||
result[res.OwnerId].ExtResource[res.Resource] = res.ResCount
|
||||
}
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user