From d05534ad6c44363f7a727840a8660634bf8ee752 Mon Sep 17 00:00:00 2001 From: Surinder Kumar Date: Mon, 9 Jan 2017 07:56:02 +0530 Subject: [PATCH] Prevent attempts to access what may be an empty list. Fixes #1832 --- web/pgadmin/browser/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pgadmin/browser/utils.py b/web/pgadmin/browser/utils.py index f75abcbc8..6697a2150 100644 --- a/web/pgadmin/browser/utils.py +++ b/web/pgadmin/browser/utils.py @@ -474,7 +474,7 @@ class PGChildNodeView(NodeView): # Fetch the type name from the dictionary # if type is not present in the types dictionary then # we will continue and not going to add it. - if type_str[0] in types: + if len(type_str) and type_str[0] in types: # if type is present in the types dictionary, but it's # value is None then it requires special handling.