Fix an issue where a change to any field in server dialog causes the 'tunnel_identity_file' model value to get included unnecessarily in the update request. Fixes #3389

pull/17/head
Murtuza Zabuawala 2018-05-31 10:10:43 -04:00 committed by Dave Page
parent 5f0799714d
commit f877de6a1f
1 changed files with 3 additions and 2 deletions

View File

@ -847,9 +847,10 @@ define('pgadmin.node.server', [
control: Backform.FileControl, dialog_type: 'select_file', supp_types: ['*'],
deps: ['tunnel_authentication', 'use_ssh_tunnel'],
disabled: function(model) {
if (!model.get('tunnel_authentication')) {
let file = model.get('tunnel_identity_file');
if (!model.get('tunnel_authentication') && file) {
setTimeout(function() {
model.set('tunnel_identity_file', '');
model.set('tunnel_identity_file', null);
}, 10);
}
return !model.get('tunnel_authentication') || !model.get('use_ssh_tunnel');