diff --git a/pkg/registry/meta/resourcecalculator/storage.go b/pkg/registry/meta/resourcecalculator/storage.go index 70220101a..bfc1526e9 100644 --- a/pkg/registry/meta/resourcecalculator/storage.go +++ b/pkg/registry/meta/resourcecalculator/storage.go @@ -109,7 +109,7 @@ func (r *Storage) Create(ctx context.Context, obj runtime.Object, createValidati if err = wrapReferencedDBResourceWithOpsReqObject(r.kc, &u); err != nil { return nil, err } - } else if in.Request.Edit { + } else if in.Request.Edit && pq != nil { if err := deductOldDbObjectResourceUsageFromProjectQuota(r.kc, u, pq); err != nil { return nil, err }