Fix active cohort lookup if user isn't the first voter

This commit is contained in:
Max Wofford 2024-08-21 17:09:18 -04:00
parent b6149defb8
commit 8a50b68844

View file

@ -9,7 +9,7 @@ async function getCohortFromAuth(authToken) {
})
const cohorts = await airtable.read({
filterByFormula: `AND(
FIND("${safeAuthToken}", {Allowed Voter Keys}) > 0,
FIND("${safeAuthToken}", ARRAYJOIN({Allowed Voter Keys})) > 0,
{Is Active} = TRUE()
)`,
maxRecords: 1