mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure that the import/export feature should work with SSH Tunnel. Fixes #5739
This commit is contained in:
committed by
Akshay Joshi
parent
ed3c692b1f
commit
1ee9cddceb
@@ -342,8 +342,12 @@ def create_import_export_job(sid):
|
||||
manager.export_password_env(p.id)
|
||||
|
||||
env = dict()
|
||||
env['PGHOST'] = server.host
|
||||
env['PGPORT'] = str(server.port)
|
||||
|
||||
env['PGHOST'] = \
|
||||
manager.local_bind_host if manager.use_ssh_tunnel else server.host
|
||||
env['PGPORT'] = \
|
||||
str(manager.local_bind_port) if manager.use_ssh_tunnel else str(
|
||||
server.port)
|
||||
env['PGUSER'] = server.username
|
||||
env['PGDATABASE'] = data['database']
|
||||
p.set_env_variables(server, env=env)
|
||||
|
||||
Reference in New Issue
Block a user