diff --git a/app/controllers/ops_controller/settings/common.rb b/app/controllers/ops_controller/settings/common.rb index fcd1dfb5c29c..1d7980f43df2 100644 --- a/app/controllers/ops_controller/settings/common.rb +++ b/app/controllers/ops_controller/settings/common.rb @@ -806,6 +806,8 @@ def settings_get_form_vars field = "ntp_server_#{field_num}" next unless params.key?(field) @edit[:new][:ntp][field] = params[field] + # remove unnecessary key from @edit[:new][:ntp] if there is no change + @edit[:new][:ntp].except!(*field) if params[field] == @edit[:new][:ntp][:server][field_num - 1] end end