Merge pull request #11672 from Budibase/fix/relationship-toast

Fix/relationship toast
This commit is contained in:
Michael Drury 2023-09-06 10:17:58 +01:00 committed by GitHub
commit 0875b9e30a
2 changed files with 3 additions and 3 deletions

View File

@ -290,11 +290,11 @@
datasource.entities[getTable(toId).name].schema[toRelationship.name] = datasource.entities[getTable(toId).name].schema[toRelationship.name] =
toRelationship toRelationship
await save() await save({ action: "saved" })
} }
async function deleteRelationship() { async function deleteRelationship() {
removeExistingRelationship() removeExistingRelationship()
await save() await save({ action: "deleted" })
await tables.fetch() await tables.fetch()
close() close()
} }

View File

@ -33,7 +33,7 @@
} }
// action is one of 'created', 'updated' or 'deleted' // action is one of 'created', 'updated' or 'deleted'
async function saveRelationship(action) { async function saveRelationship({ action }) {
try { try {
await beforeSave({ action, datasource }) await beforeSave({ action, datasource })