diff --git a/internal/session/query.go b/internal/session/query.go index 0f1bf137c8..ab4af213ec 100644 --- a/internal/session/query.go +++ b/internal/session/query.go @@ -13,7 +13,7 @@ with not_active as ( ss.state = 'pending' and ss.session_id = $1 and s.version = $2 and - s.public_id not in(select public_id from session_state where session_id = $1 and state = 'active') + s.public_id not in(select session_id from session_state where session_id = $1 and state = 'active') ) select * from not_active; `