on fetch submission data display error if there (#608)

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Chirag Chhatrala
2024-11-13 14:18:28 +05:30
committed by GitHub
parent ef12c82fe5
commit 2c8f7d5d54
2 changed files with 11 additions and 1 deletions

View File

@@ -418,6 +418,9 @@ export default {
await this.recordsStore.loadRecord(
opnFetch('/forms/' + this.form.slug + '/submissions/' + this.form.submission_id).then((data) => {
return {submission_id: this.form.submission_id, id: this.form.submission_id, ...data.data}
}).catch((error) => {
useAlert().error(error?.data?.message || 'Something went wrong')
return null
})
)
return this.recordsStore.getByKey(this.form.submission_id)