mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 10:42:45 +03:00
Made running the import outside of job on test env
- Allows to write tests for the importer easier when there is a "subscription" or a "product" present
This commit is contained in:
parent
9389064ae2
commit
748ef87954
@ -282,7 +282,7 @@ module.exports = class MembersCSVImporter {
|
||||
|
||||
meta.originalImportSize = job.batches;
|
||||
|
||||
if (job.batches <= 500 && !job.metadata.hasStripeData) {
|
||||
if ((job.batches <= 500 && !job.metadata.hasStripeData) || process.env.NODE_ENV.startsWith('test')) {
|
||||
const result = await this.perform(job.filePath);
|
||||
const importLabelModel = result.imported ? await LabelModel.findOne(importLabel) : null;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user