From 88a2309a2641cd42f9119def2f62f6b9dc869870 Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Wed, 13 Jun 2018 15:53:21 +0100 Subject: [PATCH] Fix auto-complete. Fixes #3374 --- docs/en_US/release_notes_3_1.rst | 3 ++- web/pgadmin/utils/sqlautocomplete/parseutils.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en_US/release_notes_3_1.rst b/docs/en_US/release_notes_3_1.rst index c40f3d095..8f8a759a0 100644 --- a/docs/en_US/release_notes_3_1.rst +++ b/docs/en_US/release_notes_3_1.rst @@ -35,5 +35,6 @@ Bug fixes | `Bug #3333 `_ - Ensure the runtime core application is setup before trying to access any settings | `Bug #3342 `_ - Set SESSION_COOKIE_SAMESITE='Lax' per Flask recommendation to prevents sending cookies with CSRF-prone requests from external sites, such as submitting a form | `Bug #3353 `_ - Handle errors properly if they occur when renaming a database +| `Bug #3374 `_ - Fix autocomplete | `Bug #3392 `_ - Fix IPv6 support in the container build. -| `Bug #3409 `_ - Avoid an exception on GreenPlum when retrieving RE-SQL on a table. \ No newline at end of file +| `Bug #3409 `_ - Avoid an exception on GreenPlum when retrieving RE-SQL on a table \ No newline at end of file diff --git a/web/pgadmin/utils/sqlautocomplete/parseutils.py b/web/pgadmin/utils/sqlautocomplete/parseutils.py index 29b6ac8c0..b08a3927c 100644 --- a/web/pgadmin/utils/sqlautocomplete/parseutils.py +++ b/web/pgadmin/utils/sqlautocomplete/parseutils.py @@ -73,7 +73,7 @@ TableReference = namedtuple( # This code is borrowed from sqlparse example script. # def is_subselect(parsed): - if not parsed.is_group(): + if not parsed.is_group: return False sql_type = ('SELECT', 'INSERT', 'UPDATE', 'CREATE', 'DELETE') for item in parsed.tokens: