mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Prevented random labels from being generated when base-data is present
no issue Before, when base data included labels for members, the random generated labels would also be generated. This prevents that, and ensures that the base-data labels are applied correctly to members.
This commit is contained in:
parent
f6bc3479f9
commit
9852c21ec5
1 changed files with 3 additions and 3 deletions
|
@ -268,6 +268,9 @@ class DataGenerator {
|
|||
// Up to 5 benefits for each product
|
||||
await productsBenefitsImporter.importForEach(products, {amount: 5});
|
||||
|
||||
const labelsImporter = new LabelsImporter(transaction);
|
||||
labels = await labelsImporter.import({amount: 10});
|
||||
|
||||
this.logger.info('Completed random base data generation');
|
||||
}
|
||||
|
||||
|
@ -397,9 +400,6 @@ class DataGenerator {
|
|||
const offersImporter = new OffersImporter(transaction, {products: products.filter(product => product.name !== 'Free')});
|
||||
await offersImporter.import({amount: 2});
|
||||
|
||||
const labelsImporter = new LabelsImporter(transaction);
|
||||
labels = await labelsImporter.import({amount: 10});
|
||||
|
||||
const membersLabelsImporter = new MembersLabelsImporter(transaction, {labels});
|
||||
await membersLabelsImporter.importForEach(members, {
|
||||
amount: 1
|
||||
|
|
Loading…
Add table
Reference in a new issue