Fixed list sorting issue in the schema diff tool. Fixes #5440

Fixed an issue while comparing the two identical schemas using the schema diff tool. Fixes #5449
pull/33/head
Akshay Joshi 2020-05-06 11:25:43 +05:30
parent 059f1e38cc
commit 943495de31
2 changed files with 4 additions and 2 deletions

View File

@ -23,6 +23,8 @@ Bug fixes
| `Issue #3694 <https://redmine.postgresql.org/issues/3694>`_ - Gracefully informed the user that the database is already connected when they click on "Connect Database...".
| `Issue #4279 <https://redmine.postgresql.org/issues/4279>`_ - Ensure that file browse "home" button should point to $HOME rather than /.
| `Issue #5422 <https://redmine.postgresql.org/issues/5422>`_ - Ensure that the dependencies tab shows correct information for Synonyms.
| `Issue #5440 <https://redmine.postgresql.org/issues/5440>`_ - Fixed list sorting issue in the schema diff tool.
| `Issue #5449 <https://redmine.postgresql.org/issues/5449>`_ - Fixed an issue while comparing the two identical schemas using the schema diff tool.
| `Issue #5466 <https://redmine.postgresql.org/issues/5466>`_ - Correct ipv4 "all interfaces" address in the container docs, per Frank Limpert.
| `Issue #5469 <https://redmine.postgresql.org/issues/5469>`_ - Fixed an issue where select2 hover is inconsistent for the SSL field in create server dialog.
| `Issue #5473 <https://redmine.postgresql.org/issues/5473>`_ - Fixed post-login redirect location when running in server mode under a non-default root.

View File

@ -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])