fix: set_settings password is only required if disableAuth is enabled
This commit is contained in:
parent
0821f38faa
commit
ebadfb73e6
2 changed files with 5 additions and 1 deletions
|
@ -28,6 +28,10 @@ class TestSettings(UptimeKumaTestCase):
|
|||
r = self.api.set_settings(self.password, **expected_settings)
|
||||
self.assertEqual(r["msg"], "Saved")
|
||||
|
||||
# set settings without password
|
||||
r = self.api.set_settings(**expected_settings)
|
||||
self.assertEqual(r["msg"], "Saved")
|
||||
|
||||
# get settings
|
||||
settings = self.api.get_settings()
|
||||
self.compare(settings, expected_settings)
|
||||
|
|
|
@ -853,7 +853,7 @@ class UptimeKumaApi(object):
|
|||
|
||||
def set_settings(
|
||||
self,
|
||||
password: str,
|
||||
password: str = None, # only required if disableAuth is true
|
||||
|
||||
# about
|
||||
checkUpdate: bool = True,
|
||||
|
|
Loading…
Reference in a new issue