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

Quota: Fix failure in store
This commit is contained in:
Sofia Papagiannaki
2022-11-17 18:08:25 +01:00
committed by GitHub
parent 5cad7089b3
commit 18738cfd77

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 {