From 3926226417f98955090bf361ebf5c063926eb273 Mon Sep 17 00:00:00 2001 From: woodsaj Date: Tue, 15 Sep 2015 20:31:58 +0800 Subject: [PATCH] fix getting default quota as map[string]int64 --- pkg/api/quota.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/api/quota.go b/pkg/api/quota.go index 490a8e90729..d8585435430 100644 --- a/pkg/api/quota.go +++ b/pkg/api/quota.go @@ -27,7 +27,7 @@ func UpdateOrgQuota(c *middleware.Context, cmd m.UpdateOrgQuotaCmd) Response { cmd.OrgId = c.ParamsInt64(":orgId") cmd.Target = c.Params(":target") - if _, ok := m.QuotaToMap(setting.Quota.Org)[cmd.Target]; !ok { + if _, ok := setting.Quota.Org.ToMap()[cmd.Target]; !ok { return ApiError(404, "Invalid quota target", nil) } @@ -57,7 +57,7 @@ func UpdateUserQuota(c *middleware.Context, cmd m.UpdateUserQuotaCmd) Response { cmd.UserId = c.ParamsInt64(":id") cmd.Target = c.Params(":target") - if _, ok := m.QuotaToMap(setting.Quota.User)[cmd.Target]; !ok { + if _, ok := setting.Quota.User.ToMap()[cmd.Target]; !ok { return ApiError(404, "Invalid quota target", nil) }