diff --git a/kallithea/controllers/admin/settings.py b/kallithea/controllers/admin/settings.py --- a/kallithea/controllers/admin/settings.py +++ b/kallithea/controllers/admin/settings.py @@ -365,10 +365,12 @@ class SettingsController(BaseController) # check for edits update = False _d = request.POST.dict_of_lists() - for k, v in zip(_d.get('hook_ui_key', []), - _d.get('hook_ui_value_new', [])): - Ui.create_or_update_hook(k, v) - update = True + for k, v, ov in zip(_d.get('hook_ui_key', []), + _d.get('hook_ui_value_new', []), + _d.get('hook_ui_value', [])): + if v != ov: + Ui.create_or_update_hook(k, v) + update = True if update: h.flash(_('Updated hooks'), category='success') diff --git a/kallithea/tests/functional/test_admin_settings.py b/kallithea/tests/functional/test_admin_settings.py --- a/kallithea/tests/functional/test_admin_settings.py +++ b/kallithea/tests/functional/test_admin_settings.py @@ -49,6 +49,7 @@ class TestAdminSettingsController(TestCo self.log_user() response = self.app.post(url('admin_settings_hooks'), params=dict(hook_ui_key='test_hooks_1', + hook_ui_value='old_value_of_hook_1', hook_ui_value_new='new_value_of_hook_1', _authentication_token=self.authentication_token()))