Skip to content

Commit 5073c7d

Browse files
fix(app): ensure workflow record get_many stmt is terminated
1 parent 84e8681 commit 5073c7d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

invokeai/app/services/workflow_records/workflow_records_sqlite.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,10 @@ def get_many(
168168
wildcard_query = "%" + stripped_query + "%"
169169
if categories:
170170
main_query += " AND (name LIKE ? OR description LIKE ?) "
171-
count_query += " AND (name LIKE ? OR description LIKE ?);"
171+
count_query += " AND (name LIKE ? OR description LIKE ?)"
172172
else:
173173
main_query += " WHERE name LIKE ? OR description LIKE ? "
174-
count_query += " WHERE name LIKE ? OR description LIKE ?;"
174+
count_query += " WHERE name LIKE ? OR description LIKE ?"
175175
main_params.extend([wildcard_query, wildcard_query])
176176
count_params.extend([wildcard_query, wildcard_query])
177177

@@ -181,6 +181,9 @@ def get_many(
181181
main_query += " LIMIT ? OFFSET ?"
182182
main_params.extend([per_page, page * per_page])
183183

184+
main_query += ";"
185+
count_query += ";"
186+
184187
cursor = self._conn.cursor()
185188
cursor.execute(main_query, main_params)
186189
rows = cursor.fetchall()

0 commit comments

Comments
 (0)