mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed no attribute '_asdict' error when connecting the database server. Fixes #6663
This commit is contained in:
@@ -94,19 +94,16 @@ class _WrapperColumn(object):
|
||||
# exposed as items of the cursor.description sequence.
|
||||
# Before psycopg2 2.8 the description attribute was a sequence
|
||||
# of simple tuples or namedtuples.
|
||||
if psycopg2.__version__.find('2.8') != -1:
|
||||
ores = OrderedDict()
|
||||
ores['name'] = self.orig_col.name
|
||||
ores['type_code'] = self.orig_col.type_code
|
||||
ores['display_size'] = self.orig_col.display_size
|
||||
ores['internal_size'] = self.orig_col.internal_size
|
||||
ores['precision'] = self.orig_col.precision
|
||||
ores['scale'] = self.orig_col.scale
|
||||
ores['null_ok'] = self.orig_col.null_ok
|
||||
ores['table_oid'] = self.orig_col.table_oid
|
||||
ores['table_column'] = self.orig_col.table_column
|
||||
else:
|
||||
ores = OrderedDict(self.orig_col._asdict())
|
||||
ores = OrderedDict()
|
||||
ores['name'] = self.orig_col.name
|
||||
ores['type_code'] = self.orig_col.type_code
|
||||
ores['display_size'] = self.orig_col.display_size
|
||||
ores['internal_size'] = self.orig_col.internal_size
|
||||
ores['precision'] = self.orig_col.precision
|
||||
ores['scale'] = self.orig_col.scale
|
||||
ores['null_ok'] = self.orig_col.null_ok
|
||||
ores['table_oid'] = self.orig_col.table_oid
|
||||
ores['table_column'] = self.orig_col.table_column
|
||||
|
||||
name = ores['name']
|
||||
if self.dummy_name:
|
||||
|
||||
Reference in New Issue
Block a user