mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
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:
@@ -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(
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user