mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: quota encode json allowing zero value (#1570)
This commit is contained in:
@@ -116,7 +116,9 @@ func (manager *SQuotaBaseManager) queryQuota(ctx context.Context, scope rbacutil
|
||||
|
||||
ret.Update(quota.ToJSON(""))
|
||||
ret.Update(usage.ToJSON("usage"))
|
||||
ret.Update(pending.ToJSON("pending"))
|
||||
if !pending.IsEmpty() {
|
||||
ret.Update(pending.ToJSON("pending"))
|
||||
}
|
||||
|
||||
if scope == rbacutils.ScopeDomain {
|
||||
total, err := manager.getDomainTotalQuota(ctx, ownerId.GetProjectDomainId(), nil)
|
||||
|
||||
Reference in New Issue
Block a user