From 943495de314f1dde1ef398fed392ef8f788fe929 Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Wed, 6 May 2020 11:25:43 +0530 Subject: [PATCH] =?UTF-8?q?Fixed=20list=20sorting=20issue=20in=20the=20sch?= =?UTF-8?q?ema=20diff=20tool.=20Fixes=20#5440=20Fixed=20an=20issue=20while?= =?UTF-8?q?=C2=A0comparing=C2=A0the=20two=20identical=20schemas=20using=20?= =?UTF-8?q?the=20schema=20diff=20tool.=20Fixes=20#5449?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en_US/release_notes_4_22.rst | 2 ++ web/pgadmin/tools/schema_diff/directory_compare.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/en_US/release_notes_4_22.rst b/docs/en_US/release_notes_4_22.rst index dec4db7d4..dfbf9210c 100644 --- a/docs/en_US/release_notes_4_22.rst +++ b/docs/en_US/release_notes_4_22.rst @@ -23,6 +23,8 @@ Bug fixes | `Issue #3694 `_ - Gracefully informed the user that the database is already connected when they click on "Connect Database...". | `Issue #4279 `_ - Ensure that file browse "home" button should point to $HOME rather than /. | `Issue #5422 `_ - Ensure that the dependencies tab shows correct information for Synonyms. +| `Issue #5440 `_ - Fixed list sorting issue in the schema diff tool. +| `Issue #5449 `_ - Fixed an issue while comparing the two identical schemas using the schema diff tool. | `Issue #5466 `_ - Correct ipv4 "all interfaces" address in the container docs, per Frank Limpert. | `Issue #5469 `_ - Fixed an issue where select2 hover is inconsistent for the SSL field in create server dialog. | `Issue #5473 `_ - Fixed post-login redirect location when running in server mode under a non-default root. \ No newline at end of file diff --git a/web/pgadmin/tools/schema_diff/directory_compare.py b/web/pgadmin/tools/schema_diff/directory_compare.py index fdc8d1d8c..228a99ae1 100644 --- a/web/pgadmin/tools/schema_diff/directory_compare.py +++ b/web/pgadmin/tools/schema_diff/directory_compare.py @@ -471,13 +471,13 @@ def sort_list(source, target): :return: """ # Check the above keys are exist in the dictionary - if len(source) > 0: + if len(source) > 0 and type(source[0]) == dict: tmp_key = is_key_exists(list_keys_array, source[0]) if tmp_key is not None: source = sorted(source, key=lambda k: k[tmp_key]) # Check the above keys are exist in the dictionary - if len(target) > 0: + if len(target) > 0 and type(target[0]) == dict: tmp_key = is_key_exists(list_keys_array, target[0]) if tmp_key is not None: target = sorted(target, key=lambda k: k[tmp_key])