fix wait_reg

This commit is contained in:
Ruslan 2024-11-11 10:52:10 +03:00
parent 7d7483746a
commit edefbba4e1

View file

@ -798,7 +798,16 @@ FROM public.recruits AS r
ON ri.recruit_id = r.id
WHERE r.vu_current_info ->> 'isMilitaryRegistered' = 'false'
AND r.current_recruitment_id IS NOT NULL
AND r.target_recruitment_id IS NOT NULL
AND r.target_recruitment_id IS NOT NULL
AND (
'${VK_ARRAY}' IS NOT NULL AND '${VK_ARRAY}' != ''
AND r.target_recruitment_id = ANY (
CASE
WHEN '${VK_ARRAY}' IS NULL OR '${VK_ARRAY}' = '' THEN ARRAY[]::uuid[]
ELSE string_to_array(trim(both '{}' FROM replace('${VK_ARRAY}', ' ', '')), ',')::uuid[]
END
)
)
),
extracted_children AS (
SELECT