fix pre-fxa SQL WHERE clause
This commit is contained in:
Родитель
3f135f71e9
Коммит
8708eba10a
6
db/DB.js
6
db/DB.js
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче