Merge pull request #1346 from mozilla/fix-pre-fxa-sql

fix pre-fxa SQL WHERE clause
This commit is contained in:
luke crouch 2019-11-08 14:33:55 -06:00 коммит произвёл GitHub
Родитель 236c83f685 8708eba10a
Коммит b52a8dacfc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -83,9 +83,9 @@ const DB = {
// We don't want to get subscribers records where the email address has
// since been added "under" an FxA subscription
const allEmailAddressesSubquery = knex("email_addresses").select("email");
const preFxaSubscribers = await knex("subscribers").where({
"fxa_uid": "",
}).andWhere(
const preFxaSubscribers = await knex("subscribers").whereRaw(
"(fxa_uid = '') IS NOT FALSE"
).andWhere(
"primary_email", "not in", allEmailAddressesSubquery
);
return preFxaSubscribers;