Skip to content

Commit

Permalink
Merge pull request #11904 from totten/5.0-preview-regr
Browse files Browse the repository at this point in the history
(dev/mail/5) "New Mailing" - Previews should not schedule real blasts
  • Loading branch information
monishdeb authored Mar 31, 2018
2 parents eda4db7 + 8095566 commit 569281b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ang/crmMailing/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
id: '$value.id'
}
});
delete params.scheduled_date;
delete params.recipients; // the content was merged in
params._skip_evil_bao_auto_recipients_ = 1; // skip recipient rebuild on mail preview
return qApi('Mailing', 'create', params).then(function(result) {
Expand All @@ -300,6 +301,7 @@
'api.email.getvalue': {'return': 'email'}
}
});
delete params.scheduled_date;
delete params.recipients; // the content was merged in
return qApi('Mailing', 'create', params).then(function (recipResult) {
// changes rolled back, so we don't care about updating mailing
Expand Down Expand Up @@ -332,6 +334,7 @@
});
crmMailingCache.put('mailing-' + mailing.id + '-recipient-params', params.recipients);
}
delete params.scheduled_date;
delete params.recipients; // the content was merged in
recipientCount = qApi('Mailing', 'create', params).then(function (recipResult) {
// changes rolled back, so we don't care about updating mailing
Expand Down

0 comments on commit 569281b

Please sign in to comment.