Ensure that the Binary path for PG14 should be visible in the preferences. Fixes #6972

This commit is contained in:
Akshay Joshi 2021-11-15 12:44:33 +05:30
parent e67bad3461
commit 0ca7dbccf6
2 changed files with 10 additions and 2 deletions

View File

@ -34,6 +34,7 @@ Bug fixes
| `Issue #6940 <https://redmine.postgresql.org/issues/6940>`_ - Fixed an issue where user details are not shown when the non-admin user tries to connect to the shared server.
| `Issue #6949 <https://redmine.postgresql.org/issues/6949>`_ - Ensure that dialog should be opened when clicking on Reassign/Drop owned menu.
| `Issue #6954 <https://redmine.postgresql.org/issues/6954>`_ - Ensure that changing themes should work on Windows when system high contrast mode is enabled.
| `Issue #6972 <https://redmine.postgresql.org/issues/6972>`_ - Ensure that the Binary path for PG14 should be visible in the preferences.
| `Issue #6974 <https://redmine.postgresql.org/issues/6974>`_ - Added operators and aggregates in search objects.
| `Issue #6976 <https://redmine.postgresql.org/issues/6976>`_ - Fixed an issue where textarea should be allowed to resize and have more than 255 chars.
| `Issue #6988 <https://redmine.postgresql.org/issues/6988>`_ - Reset the layout if pgAdmin4 detects the layout is in an inconsistent state.

View File

@ -102,11 +102,18 @@ class ServerType(object):
bin_paths_server_based = \
copy.deepcopy(BINARY_PATHS['as_bin_paths'])
bin_path_dict = \
{item['version']: item for item in bin_paths_server_based}
old_path_dict = \
{item['version']: item for item in json.loads(old_path)}
for item in bin_path_dict:
bin_path_dict[item].update(old_path_dict.get(item, {}))
bin_paths_server_based = list(bin_path_dict.values())
if not ServerType.is_binary_path_of_type_json(old_path):
set_binary_path(old_path, bin_paths_server_based,
key, set_as_default=True)
else:
bin_paths_server_based = json.loads(old_path)
# Set the DEFAULT_BINARY_PATHS if any
ServerType.set_default_binary_path(bin_paths_server_based, key)