diff options
author | Amjith Ramanujam <amjith.r@gmail.com> | 2015-08-04 07:08:45 -0700 |
---|---|---|
committer | Amjith Ramanujam <amjith.r@gmail.com> | 2015-08-04 07:08:45 -0700 |
commit | 67866c46f4d802534a7b99e0ed173bee3f3604da (patch) | |
tree | 92145a3eb80fe2b488937efb8789b6af9f00fe4f | |
parent | 0c484105631cce40423a03a664415fd49cedc094 (diff) | |
parent | 73d82143e525b6e0470ba6566bc8ed246eb9c361 (diff) |
Merge pull request #318 from dbcli/darikg/bugfix-317
Fix issue #317
-rw-r--r-- | pgcli/packages/sqlcompletion.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pgcli/packages/sqlcompletion.py b/pgcli/packages/sqlcompletion.py index 47c72600..2e4fe6a8 100644 --- a/pgcli/packages/sqlcompletion.py +++ b/pgcli/packages/sqlcompletion.py @@ -167,7 +167,7 @@ def suggest_based_on_last_token(token, text_before_cursor, full_text, identifier # SELECT Identifier <CURSOR> # SELECT foo FROM Identifier <CURSOR> prev_keyword, _ = find_prev_keyword(text_before_cursor) - if prev_keyword.value == '(': + if prev_keyword and prev_keyword.value == '(': # Suggest datatypes return suggest_based_on_last_token('type', text_before_cursor, full_text, identifier) |