Skip to content

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

fix: must find a database in composeBackupSetting (#2717)

p0ny4341aafe0df7
diff --git a/store/backup.go b/store/backup.go
index fd773a06f1..766240bf97 100644
--- a/store/backup.go
+++ b/store/backup.go
@@ -279,6 +279,9 @@ func (s *Store) composeBackupSetting(ctx context.Context, raw *backupSettingRaw)
if err != nil {
return nil, err
}
+ if database == nil {
+ return nil, errors.Errorf("failed to get database with databaseID %v", backupSetting.DatabaseID)
+ }
backupSetting.Database = database
return backupSetting, nil