Fixed string index out of range error where the dependent tab is in focus and selecting any publication or table. Fixes #6292

This commit is contained in:
Akshay Joshi
2021-03-09 18:43:04 +05:30
parent 0f62fecca2
commit 351d86e149
2 changed files with 3 additions and 1 deletions

View File

@@ -639,7 +639,8 @@ class PGChildNodeView(NodeView):
# if type is present in the types dictionary, but it's
# value is None then it requires special handling.
if type_str[0] == 'r':
if (type_str[1].isdigit() and int(type_str[1]) > 0) or \
if (len(type_str) > 1 and type_str[1].isdigit() and
int(type_str[1]) > 0) or \
(len(type_str) > 2 and type_str[2].isdigit() and
int(type_str[2]) > 0):
type_name = 'column'