Skip to content

Commit

Permalink
Fix resource-calculator edit bug (#270)
Browse files Browse the repository at this point in the history
Signed-off-by: Imtiaz Uddin <[email protected]>
  • Loading branch information
Imtiaz246 authored Nov 1, 2023
1 parent 34de855 commit b948c4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/registry/meta/resourcecalculator/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit b948c4c

Please sign in to comment.