Skip to content

Commit 12ca750

Browse files
Revert Copilot suggestion: and project_client is unnecessary.
`project_client` is always initialized before thread creation, so `if thread:` is sufficient.
1 parent 4f81d2a commit 12ca750

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/App/backend/plugins/chat_with_data_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ async def get_SQL_Response(
107107
logging.exception("Error in get_SQL_Response")
108108
return f"Error retrieving SQL data: {str(e)}"
109109
finally:
110-
if thread and project_client:
110+
if thread:
111111
try:
112112
logging.info(f"Attempting to delete thread {thread.id}")
113113
await project_client.agents.threads.delete(thread.id)

0 commit comments

Comments
 (0)