Skip to content

Commit 528c1db

Browse files
committed
fix(Data Source): Unable to save after deleting all table relationships.
1 parent f63cf2a commit 528c1db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/src/views/ds/TableRelationship.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ const drop = (e: any) => {
406406
})
407407
}
408408
const save = () => {
409-
datasourceApi.relationSave(props.id, graph.toJSON().cells).then(() => {
409+
datasourceApi.relationSave(props.id, graph ? graph.toJSON().cells : []).then(() => {
410410
ElMessage({
411411
type: 'success',
412412
message: t('common.save_success'),
@@ -447,7 +447,7 @@ const save = () => {
447447
@drop.prevent.stop="drop"
448448
></div>
449449
<div class="save-btn">
450-
<el-button v-if="nodeIds.length" type="primary" @click="save">
450+
<el-button type="primary" @click="save">
451451
{{ t('common.save') }}
452452
</el-button>
453453
</div>

0 commit comments

Comments
 (0)