Skip to content

Commit 8d25dcf

Browse files
committed
fix: pg delete compatibility
1 parent f02ffc6 commit 8d25dcf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/baas/postgresql/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,12 @@ class Postgresql {
103103

104104
async remove(inputs = {}) {
105105
const { dBInstanceName } = inputs
106-
// need circle for deleting, after host status is 6, then we can delete it
107-
await deleteDbInstance(this.capi, dBInstanceName)
106+
107+
const dbDetail = await getDbInstanceDetail(this.capi, dBInstanceName)
108+
if (dbDetail && dbDetail.DBInstanceName) {
109+
// need circle for deleting, after host status is 6, then we can delete it
110+
await deleteDbInstance(this.capi, dBInstanceName)
111+
}
108112
return {}
109113
}
110114
}

0 commit comments

Comments
 (0)