From 05f10a393185c202e0a34b90708ace999f31c7df Mon Sep 17 00:00:00 2001
From: Ahmad Haidar <ahmad.haidar.syr@gmail.com>
Date: Mon, 13 Jan 2025 18:10:53 +0300
Subject: [PATCH] hotfix: switch query table to transitions

---
 .../queries/executions/get_paused_execution_token.py           | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/agents-api/agents_api/queries/executions/get_paused_execution_token.py b/agents-api/agents_api/queries/executions/get_paused_execution_token.py
index 677fd91a3..46344708a 100644
--- a/agents-api/agents_api/queries/executions/get_paused_execution_token.py
+++ b/agents-api/agents_api/queries/executions/get_paused_execution_token.py
@@ -6,9 +6,10 @@
 from ...common.utils.db_exceptions import common_db_exceptions
 from ..utils import pg_query, rewrap_exceptions, wrap_in_class
 
+# FIXME: We should use latest_transitions instead of transitions
 # Query to get a paused execution token
 get_paused_execution_token_query = """
-SELECT * FROM latest_transitions
+SELECT * FROM transitions
 WHERE
     execution_id = $1
         AND type = 'wait'