[Answer]-Cast result from left join to boolean in postgres with django

1👍

All you need to do is to cast your output to boolean.
Your query:

SELECT COALESCE(afiliado::boolean, false), COALESCE(id::boolean, false) 
FROM `persona` 
LEFT OUTER JOIN `afiliado` ON (`persona`.`id` = `afiliado`.`id`);
👤Borys

Leave a comment