fix: set_settings password is only required if disableAuth is enabled

This commit is contained in:
lucasheld 2022-09-23 17:19:00 +02:00
parent 0821f38faa
commit ebadfb73e6
2 changed files with 5 additions and 1 deletions

View file

@ -28,6 +28,10 @@ class TestSettings(UptimeKumaTestCase):
r = self.api.set_settings(self.password, **expected_settings) r = self.api.set_settings(self.password, **expected_settings)
self.assertEqual(r["msg"], "Saved") self.assertEqual(r["msg"], "Saved")
# set settings without password
r = self.api.set_settings(**expected_settings)
self.assertEqual(r["msg"], "Saved")
# get settings # get settings
settings = self.api.get_settings() settings = self.api.get_settings()
self.compare(settings, expected_settings) self.compare(settings, expected_settings)

View file

@ -853,7 +853,7 @@ class UptimeKumaApi(object):
def set_settings( def set_settings(
self, self,
password: str, password: str = None, # only required if disableAuth is true
# about # about
checkUpdate: bool = True, checkUpdate: bool = True,