Skip to content

Commit 0f12020

Browse files
authored
Merge pull request #1331 from dbcli/RW/temporary-fq-completion-crash-fix
Temporary favorite query completion crash fix
2 parents f885c67 + 91d8265 commit 0f12020

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

changelog.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
Upcoming Release (TBD)
1+
1.38.0 (2025/08/19)
22
======================
33

4+
Bug Fixes
5+
--------
6+
* Partially fix Favorite Query completion crash.
7+
8+
49
Internal
510
--------
611
* Improve CI worflow naming.

mycli/sqlcompleter.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,8 +1193,9 @@ def get_completions(
11931193
completions.extend(special_m)
11941194

11951195
elif suggestion["type"] == "favoritequery":
1196-
queries_m = self.find_matches(word_before_cursor, FavoriteQueries.instance.list(), start_only=False, fuzzy=True)
1197-
completions.extend(queries_m)
1196+
if hasattr(FavoriteQueries, 'instance') and hasattr(FavoriteQueries.instance, 'list'):
1197+
queries_m = self.find_matches(word_before_cursor, FavoriteQueries.instance.list(), start_only=False, fuzzy=True)
1198+
completions.extend(queries_m)
11981199

11991200
elif suggestion["type"] == "table_format":
12001201
formats_m = self.find_matches(word_before_cursor, self.table_formats)

0 commit comments

Comments
 (0)