mirror of https://github.com/zulip/zulip.git
settings: Change error for "no data" to something more friendly.
This commit is contained in:
parent
ffe3a6c127
commit
849d63dd1c
|
@ -150,7 +150,7 @@ class ChangeSettingsTest(ZulipTestCase):
|
|||
self.login(self.example_email("hamlet"))
|
||||
result = self.client_patch("/json/settings",
|
||||
dict(old_password='ignored',))
|
||||
self.assert_json_error(result, "No new data supplied")
|
||||
self.assert_json_error(result, "Please fill out all fields.")
|
||||
|
||||
def do_test_change_user_display_setting(self, setting_name: str) -> None:
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ def json_change_settings(request: HttpRequest, user_profile: UserProfile,
|
|||
old_password: Text=REQ(default=""),
|
||||
new_password: Text=REQ(default="")) -> HttpResponse:
|
||||
if not (full_name or new_password or email):
|
||||
return json_error(_("No new data supplied"))
|
||||
return json_error(_("Please fill out all fields."))
|
||||
|
||||
if new_password != "":
|
||||
if not authenticate(username=user_profile.email, password=old_password,
|
||||
|
|
Loading…
Reference in New Issue