Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
api: Remove error for no settings changes requested.
Tim Abbott4fb6f089e56e
diff --git a/zerver/tests/test_settings.py b/zerver/tests/test_settings.pyindex caa8c6d0618..78bf3f3da98 100644--- a/zerver/tests/test_settings.py+++ b/zerver/tests/test_settings.py@@ -322,16 +322,6 @@ class ChangeSettingsTest(ZulipTestCase):)self.assert_json_error(result, "Your Zulip password is managed in LDAP")- def test_changing_nothing_returns_error(self) -> None:- """- We need to supply at least one non-empty parameter- to this API, or it should fail. (Eventually, we should- probably use a patch interface for these changes.)- """- self.login("hamlet")- result = self.client_patch("/json/settings", dict(old_password="ignored"))- self.assert_json_error(result, "Please fill out all fields.")-def do_test_change_user_display_setting(self, setting_name: str) -> None:test_changes: Dict[str, Any] = dict(diff --git a/zerver/views/user_settings.py b/zerver/views/user_settings.pyindex 90783f0d066..c77cbb47b33 100644--- a/zerver/views/user_settings.py+++ b/zerver/views/user_settings.py@@ -97,9 +97,6 @@ def json_change_settings(old_password: str = REQ(default=""),new_password: str = REQ(default=""),) -> HttpResponse:- if not (full_name or new_password or email):- raise JsonableError(_("Please fill out all fields."))-if new_password != "":return_data: Dict[str, Any] = {}if email_belongs_to_ldap(user_profile.realm, user_profile.delivery_email):