mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
1) Added logic to set the appropriate default binary path if DEFAULT_BINARY_PATH is
set in the config and the user not updated the preferences. 2) Remove 'gpdb' from DEFAULT_BINARY_PATH. 3) Fixed API test cases. refs #5370
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
##########################################################################
|
||||
|
||||
|
||||
import fileinput
|
||||
import traceback
|
||||
import os
|
||||
import sys
|
||||
@@ -36,6 +35,7 @@ import regression
|
||||
from regression import test_setup
|
||||
|
||||
from pgadmin.utils.preferences import Preferences
|
||||
from pgadmin.utils.constants import BINARY_PATHS
|
||||
|
||||
from functools import wraps
|
||||
|
||||
@@ -767,10 +767,15 @@ def configure_preferences(default_binary_path=None):
|
||||
if user_pref_data:
|
||||
cur.execute(
|
||||
'UPDATE user_preferences SET value = ? WHERE pid = ?',
|
||||
(default_binary_path[server], pref_bin_path.pid)
|
||||
(pref_bin_path.default, pref_bin_path.pid)
|
||||
)
|
||||
else:
|
||||
params = (pref_bin_path.pid, 1, default_binary_path[server])
|
||||
if server == 'ppas':
|
||||
params = (pref_bin_path.pid, 1,
|
||||
json.dumps(BINARY_PATHS['as_bin_paths']))
|
||||
else:
|
||||
params = (pref_bin_path.pid, 1,
|
||||
json.dumps(BINARY_PATHS['pg_bin_paths']))
|
||||
cur.execute(
|
||||
insert_preferences_query, params
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user