mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed keyerror issue in schema diff for 'attnum' and 'edit_types' parameter. Fixes #6755
This commit is contained in:
@@ -170,12 +170,7 @@ class SchemaDiffTableCompare(SchemaDiffObjectCompare):
|
||||
tmp = copy.deepcopy(item)
|
||||
|
||||
if tmp and source != tmp:
|
||||
tmp_updated = copy.deepcopy(source)
|
||||
# Preserve the column number
|
||||
tmp_updated['attnum'] = tmp['attnum']
|
||||
if item['typname'] not in tmp_updated['edit_types']:
|
||||
tmp_updated['col_type_conversion'] = False
|
||||
updated.append(tmp_updated)
|
||||
updated.append(source)
|
||||
target_cols.remove(tmp)
|
||||
elif tmp and source == tmp:
|
||||
target_cols.remove(tmp)
|
||||
|
||||
@@ -1276,7 +1276,7 @@ class BaseTableView(PGChildNodeView, BasePartitionTable, VacuumSettings):
|
||||
"/".join([self.column_template_path,
|
||||
self._PROPERTIES_SQL]),
|
||||
tid=tid,
|
||||
clid=c['attnum'],
|
||||
clid=c['attnum'] if 'attnum' in c else None,
|
||||
show_sys_objects=self.blueprint.show_system_objects
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user