mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
Added member_segment persistance to email_batches
refs https://github.com/TryGhost/Team/issues/828 - We need a way to recreate a filter that was used to create an email content for specific email_recipient. By saving member_segment value for each email_batch we can traverse back to the filter that was applied during email creation.
This commit is contained in:
parent
0b333765d4
commit
d33baf9ba4
@ -406,8 +406,10 @@ async function createEmailBatches({emailModel, memberSegment, options}) {
|
||||
|
||||
const storeRecipientBatch = async function (recipients) {
|
||||
const knexOptions = _.pick(options, ['transacting', 'forUpdate']);
|
||||
// TODO: store `memberSegment` in EmailBatch once the table migration is merged
|
||||
const batchModel = await models.EmailBatch.add({email_id: emailModel.id}, knexOptions);
|
||||
const batchModel = await models.EmailBatch.add({
|
||||
email_id: emailModel.id,
|
||||
member_segment: memberSegment
|
||||
}, knexOptions);
|
||||
|
||||
const recipientData = [];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user