You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PG::SyntaxError: ERROR: syntax error at or near ")"
LINE 9: ()
^
app/models/user.rb:67:in `matches'
select { |dt| dt.score_direitos_humanos.to_i > 0 }
app/controllers/users_controller.rb:40:in `matchup'
@matdata = @user.matches
...
(96 additional frame(s) were not displayed)
ActiveRecord::StatementInvalid: PG::SyntaxError: ERROR: syntax error at or near ")"
LINE 9: ()
^
: SELECT
(
select
count(*)
from
answers ca
where
ca.responder_id = candidates.id and ca.responder_type='Candidate' and ca.short_answer = 'Sim' and
()
) as score_eleitor
,(
select
count(*)
from
answers ca
where
ca.responder_id = candidates.id and ca.responder_type='Candidate' and ca.short_answer = 'Sim'
) as score_direitos_humanos
, candidates.nickname
, candidates.id as id
, (select u.score from parties_unions pu inner join unions u on pu.union_id = u.id where pu.party_id = candidates.party_id and u.city_id = candidates.city_id limit 1) as union_score
, parties.score as party_score
, (select count(*) from users us where us.candidate_id = candidates.id) as votos
FROM "candidates" INNER JOIN "parties" ON "parties"."id" = "candidates"."party_id" WHERE (candidates.finished_at is not null and candidates.city_id = 4205407)
ActiveRecord::StatementInvalid: PG::SyntaxError: ERROR: syntax error at or near ")"
LINE 9: ()
^
: SELECT
(
select
count(*)
from
answers ca
where
ca.responder_id = candidates.id and ca.responder_type='Candidate' and ca.short_answer = 'Sim' and
()
) as score_eleitor
,(
select
count(*)
from
answers ca
where
ca.responder_id = candidates.id and ca.responder_type='Candidate' and ca.short_answer = 'Sim'
) as score_direitos_humanos
, candidates.nickname
, candidates.id as id
, (select u.score from parties_unions pu inner join unions u on pu.union_id = u.id where pu.party_id = candidates.party_id and u.city_id = candidates.city_id limit 1) as union_score
, parties.score as party_score
, (select count(*) from users us where us.candidate_id = candidates.id) as votos
FROM "candidates" INNER JOIN "parties" ON "parties"."id" = "candidates"."party_id" WHERE (candidates.finished_at is not null and candidates.city_id = 4205407)
The text was updated successfully, but these errors were encountered:
https://sentry.io/nossas-cidades/me-representa/issues/164534777/
The text was updated successfully, but these errors were encountered: