From 18738cfd77704799735a8f25aa2c3d20feb5beca Mon Sep 17 00:00:00 2001 From: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com> Date: Thu, 17 Nov 2022 18:08:25 +0100 Subject: [PATCH] Quota: Fix failure in store due to missing scope parameters (#58874) Quota: Fix failure in store --- pkg/services/quota/quotaimpl/store.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/services/quota/quotaimpl/store.go b/pkg/services/quota/quotaimpl/store.go index d6111580f28..78bc38fe4d9 100644 --- a/pkg/services/quota/quotaimpl/store.go +++ b/pkg/services/quota/quotaimpl/store.go @@ -30,6 +30,10 @@ func (ss *sqlStore) DeleteByUser(ctx quota.Context, userID int64) error { func (ss *sqlStore) Get(ctx quota.Context, scopeParams *quota.ScopeParameters) (*quota.Map, error) { limits := quota.Map{} + if scopeParams == nil { + return &limits, nil + } + if scopeParams.OrgID != 0 { orgLimits, err := ss.getOrgScopeQuota(ctx, scopeParams.OrgID) if err != nil {