Skip to content

Commit 18738cf

Browse files
authored
Quota: Fix failure in store due to missing scope parameters (grafana#58874)
Quota: Fix failure in store
1 parent 5cad708 commit 18738cf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/services/quota/quotaimpl/store.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ func (ss *sqlStore) DeleteByUser(ctx quota.Context, userID int64) error {
3030

3131
func (ss *sqlStore) Get(ctx quota.Context, scopeParams *quota.ScopeParameters) (*quota.Map, error) {
3232
limits := quota.Map{}
33+
if scopeParams == nil {
34+
return &limits, nil
35+
}
36+
3337
if scopeParams.OrgID != 0 {
3438
orgLimits, err := ss.getOrgScopeQuota(ctx, scopeParams.OrgID)
3539
if err != nil {

0 commit comments

Comments
 (0)