Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

settings_account: Fix error message while deactivating account.

sahil83938eac64d91e5
diff --git a/static/js/settings_account.js b/static/js/settings_account.js
index 3034b705e03..21e8cbb86ba 100644
--- a/static/js/settings_account.js
+++ b/static/js/settings_account.js
@@ -590,16 +590,16 @@ exports.set_up = function () {
window.location.href = "/login/";
},
error(xhr) {
- const error_last_admin = i18n.t(
- "Error: Cannot deactivate the only organization administrator.",
+ const error_last_owner = i18n.t(
+ "Error: Cannot deactivate the only organization owner.",
);
const error_last_user = i18n.t(
'Error: Cannot deactivate the only user. You can deactivate the whole organization though in your <a target="_blank" href="/#organization/organization-profile">Organization profile settings</a>.',
);
let rendered_error_msg;
if (xhr.responseJSON.code === "CANNOT_DEACTIVATE_LAST_USER") {
- if (xhr.responseJSON.is_last_admin) {
- rendered_error_msg = error_last_admin;
+ if (xhr.responseJSON.is_last_owner) {
+ rendered_error_msg = error_last_owner;
} else {
rendered_error_msg = error_last_user;
}