0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Removed checkEmailList flag check

refs https://github.com/TryGhost/Team/issues/906

- The feature is entering GA stage and the flag is no longer needed
This commit is contained in:
Naz 2021-08-20 17:27:56 +04:00
parent 6e4437c7e4
commit 9cbe5efdf5
2 changed files with 4 additions and 17 deletions

View file

@ -271,15 +271,10 @@ module.exports = class MembersCSVImporter {
async process({pathToCSV, headerMapping, globalLabels, importLabel, user, LabelModel}) {
const meta = {};
const job = await this.prepare(pathToCSV, headerMapping, globalLabels);
const threshold = await this._fetchThreshold();
meta.originalImportSize = job.batches;
if (this._isSet('checkEmailList')) {
const threshold = await this._fetchThreshold();
meta.freeze = job.batches > threshold;
} else {
meta.freeze = false;
}
meta.freeze = job.batches > threshold;
if (job.batches <= 500 && !job.metadata.hasStripeData) {
const result = await this.perform(job.id);

View file

@ -61,16 +61,12 @@ describe('Importer', function () {
findOne: sinon.stub().resolves(null)
};
const isSetStub = sinon.stub()
.withArgs('checkEmailList')
.returns('true');
const importer = new MembersCSVImporter({
storagePath: csvPath,
getTimezone: sinon.stub().returns('UTC'),
getMembersApi: () => membersApi,
sendEmail: sinon.stub(),
isSet: isSetStub,
isSet: sinon.stub(),
addJob: sinon.stub(),
knex: knexStub,
urlFor: sinon.stub(),
@ -141,16 +137,12 @@ describe('Importer', function () {
findOne: sinon.stub().resolves(null)
};
const isSetStub = sinon.stub()
.withArgs('checkEmailList')
.returns('true');
const importer = new MembersCSVImporter({
storagePath: csvPath,
getTimezone: sinon.stub().returns('UTC'),
getMembersApi: () => membersApi,
sendEmail: sinon.stub(),
isSet: isSetStub,
isSet: sinon.stub(),
addJob: sinon.stub(),
knex: knexStub,
urlFor: sinon.stub(),