Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: check sheets for plan check run creates (#17281)

boojack72a22298d706
diff --git a/backend/api/v1/plan_service_plan_check.go b/backend/api/v1/plan_service_plan_check.go
index 2a49e32560..4e25beaffb 100644
--- a/backend/api/v1/plan_service_plan_check.go
+++ b/backend/api/v1/plan_service_plan_check.go
@@ -170,6 +170,13 @@ func getPlanCheckRunsFromChangeDatabaseConfigForDatabase(ctx context.Context, s
if instance == nil {
return nil, errors.Errorf("instance %q not found", database.InstanceID)
}
+ sheet, err := s.GetSheet(ctx, &store.FindSheetMessage{UID: &sheetUID})
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to get sheet %d", sheetUID)
+ }
+ if sheet == nil {
+ return nil, errors.Errorf("sheet %d not found", sheetUID)
+ }
var planCheckRuns []*store.PlanCheckRunMessage
planCheckRuns = append(planCheckRuns, &store.PlanCheckRunMessage{