[v9.3.x] Quota: Fix failure in store due to missing scope parameters (#58923)

Quota: Fix failure in store due to missing scope parameters (#58874)

Quota: Fix failure in store
(cherry picked from commit 18738cfd77)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2022-11-17 18:28:11 +01:00
committed by GitHub
co-authored by Sofia Papagiannaki
parent ffa649e377
commit 4fb033d525
+4
View File
@@ -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 {