Commit 4f3a860c by Иван Кубота

fix

parent 0299c626
Pipeline #567 failed with stage
......@@ -528,7 +528,13 @@ module.exports = {
if( ( args.type !== void 0 ? args.type === 2 : seeded() > 0.5 ) ){
result = ctx.standardGenerator( () => rand( 1, countStdQ ) )
}else{
result = ctx.quizGenerator( multiple ? 'checkbox' : 'radio', args.photo !== void 0 ? args.photo : photo );
result = ctx.quizGenerator(
multiple ? 'checkbox' : 'radio',
args.photo !== void 0 ? args.photo : photo,
(p)=>{
return p.use||p.is_test}
);
}
if(result && args.exclude){
if(args.exclude.filter((a)=>a.categoryId === result.categoryId && a.productId === result.productId).length){
......@@ -667,7 +673,9 @@ module.exports = {
);
}
if(result){
if(result && !(result.categoryId + '.' + result.productId in used)){
used[ result.categoryId + '.' + result.productId ] = true;
list.push( result );
generated++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment