FIX: Error messages from editing user being swallowed (#10908)
This commit is contained in:
parent
95a142741c
commit
b19e8ea206
|
@ -139,8 +139,8 @@ const AdminUser = User.extend({
|
||||||
bootbox.hideAll();
|
bootbox.hideAll();
|
||||||
let error;
|
let error;
|
||||||
AdminUser.find(user.get("id")).then((u) => user.setProperties(u));
|
AdminUser.find(user.get("id")).then((u) => user.setProperties(u));
|
||||||
if (e.responseJSON && e.responseJSON.errors) {
|
if (e.jqXHR.responseJSON && e.jqXHR.responseJSON.errors) {
|
||||||
error = e.responseJSON.errors[0];
|
error = e.jqXHR.responseJSON.errors[0];
|
||||||
}
|
}
|
||||||
error = error || I18n.t("admin.user.delete_posts_failed");
|
error = error || I18n.t("admin.user.delete_posts_failed");
|
||||||
bootbox.alert(error);
|
bootbox.alert(error);
|
||||||
|
@ -236,8 +236,8 @@ const AdminUser = User.extend({
|
||||||
.then(() => window.location.reload())
|
.then(() => window.location.reload())
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
let error;
|
let error;
|
||||||
if (e.responseJSON && e.responseJSON.errors) {
|
if (e.jqXHR.responseJSON && e.jqXHR.responseJSON.errors) {
|
||||||
error = e.responseJSON.errors[0];
|
error = e.jqXHR.responseJSON.errors[0];
|
||||||
}
|
}
|
||||||
error =
|
error =
|
||||||
error ||
|
error ||
|
||||||
|
@ -260,8 +260,8 @@ const AdminUser = User.extend({
|
||||||
.then(() => window.location.reload())
|
.then(() => window.location.reload())
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
let error;
|
let error;
|
||||||
if (e.responseJSON && e.responseJSON.errors) {
|
if (e.jqXHR.responseJSON && e.jqXHR.responseJSON.errors) {
|
||||||
error = e.responseJSON.errors[0];
|
error = e.jqXHR.responseJSON.errors[0];
|
||||||
}
|
}
|
||||||
error =
|
error =
|
||||||
error ||
|
error ||
|
||||||
|
|
Loading…
Reference in New Issue