diff --git a/api.planx.uk/modules/saveAndReturn/service/validateSession.ts b/api.planx.uk/modules/saveAndReturn/service/validateSession.ts index 34445d26bc..5f197b7613 100644 --- a/api.planx.uk/modules/saveAndReturn/service/validateSession.ts +++ b/api.planx.uk/modules/saveAndReturn/service/validateSession.ts @@ -197,7 +197,12 @@ export async function findSession({ gql` query FindSession($sessionId: uuid!, $email: String!) { sessions: lowcal_sessions( - where: { id: { _eq: $sessionId }, email: { _eq: $email } } + where: { + id: { _eq: $sessionId } + email: { _eq: $email } + submitted_at: { _is_null: true } + deleted_at: { _is_null: true } + } limit: 1 ) { flow_id