From 288ba1d1f90e575a6f9415001fb1b3bdb85659d4 Mon Sep 17 00:00:00 2001 From: Pravesh Sharma Date: Thu, 13 Apr 2023 13:27:16 +0530 Subject: [PATCH] Fixed an issue where collation was set to none if we remove it while creating partitioned table. #5820 --- .../servers/databases/schemas/collations/__init__.py | 2 +- .../server_groups/servers/databases/schemas/tables/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/__init__.py index c5b6612c7..1295982fb 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/__init__.py +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/__init__.py @@ -370,7 +370,7 @@ class CollationView(PGChildNodeView, SchemaDiffObjectCompare): as AJAX response. """ - res = [{'label': '', 'value': ''}] + res = [] try: SQL = render_template("/".join([self.template_path, 'get_collations.sql'])) diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py index c1d990d7f..1a4d63d49 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/utils.py @@ -1139,7 +1139,7 @@ class BaseTableView(PGChildNodeView, BasePartitionTable, VacuumSettings): if row['key_type'] == 'column': partition_scheme += self.qtIdent( self.conn, row['pt_column']) - if 'collationame' in row: + if 'collationame' in row and row['collationame']: partition_scheme += ' COLLATE %s' % row['collationame'] if 'op_class' in row: