[pgAdmin][RM4577] "string indices must be integers" displayed if click on PostgreSQL internal columns
Aditya Toshniwal <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.pgadmin.devel |
|---|---|
| Message-ID | <CAM9w-_=daBUJdRtmzxfh5SnM+b+PfGV2TC=JOyiX1HUntnuVjw@mail.gmail.com> |
Hi Hackers, Attached is the patch to fix the error "string indices must be integers" displayed if clicked on PostgreSQL internal columns under the columns node. Kindly review. -- Thanks and Regards, Aditya Toshniwal Software Engineer | EnterpriseDB India | Pune "Don't Complain about Heat, Plant a TREE"
RM4577.patch
(application/octet-stream, 928 B)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/__init__.py
index 28420fa9..cfa653c7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/__init__.py
@@ -970,9 +970,15 @@ class ColumnsView(PGChildNodeView, DataTypeReader):
clid: Column ID
"""
+
+ # Specific condition for column which we need to append
+ where = "WHERE dep.objid={0}::OID AND dep.objsubid={1}".format(
+ tid, clid
+ )
+
# Specific condition for column which we need to append
dependencies_result = self.get_dependencies(
- self.conn, clid
+ self.conn, clid, where
)
return ajax_response(