Skip to content

Commit

Permalink
kansa: Use wsfs_member value in site selection
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli committed Aug 5, 2018
1 parent dda5548 commit d87251b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions kansa/lib/siteselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ class Siteselect {
if (data.used) throw new InputError(`Token already used at ${data.used}`)
return this.db.oneOrNone(`
SELECT p.legal_name, p.email, s.time AS vote_time
FROM people p LEFT JOIN siteselection_votes s ON (p.id = s.person_id)
WHERE p.id = $1 AND p.membership IN
('Supporter','Youth','FirstWorldcon','Adult')`, id)
FROM people p
LEFT JOIN siteselection_votes s ON (p.id = s.person_id)
LEFT JOIN membership_types m USING (membership)
WHERE p.id = $1 AND m.wsfs_member = true`, id)

case 2:
if (!data) throw new InputError('Voter not found')
Expand Down

0 comments on commit d87251b

Please sign in to comment.