api: Remove error for no settings changes requested.

While this error message was vaguely useful, it wasn't reachable via
the UI at all, and it prevents merging this endpoint with related
endpoints.
This commit is contained in:
Tim Abbott
2021-07-07 13:10:56 -07:00
parent 528e5adaab
commit 4fb6f089e5
2 changed files with 0 additions and 13 deletions

View File

@@ -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(

View File

@@ -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):