diff --git a/tailbone/templates/formposter.mako b/tailbone/templates/formposter.mako index 5c695eb2..ab9c720d 100644 --- a/tailbone/templates/formposter.mako +++ b/tailbone/templates/formposter.mako @@ -47,10 +47,7 @@ this.$http.post(action, params, {headers: headers}).then(response => { - if (response.data.ok) { - success(response) - - } else { + if (response.data.error) { this.$buefy.toast.open({ message: "Submit failed: " + (response.data.error || "(unknown error)"), @@ -60,6 +57,9 @@ if (failure) { failure(response) } + + } else { + success(response) } }, response => {