diff --git a/generateLdif.js b/generateLdif.js index 9e60202..c266fb8 100644 --- a/generateLdif.js +++ b/generateLdif.js @@ -203,8 +203,15 @@ for (let schoolId = 0; schoolId < options.numberOfSchools; schoolId += 1) { const r = Math.random(); if (r < 0.1 && admins.length < 10) { admins.push(user.dn); continue; } if (r < 0.1 && ignored.length < 10) { ignored.push(user.dn); continue; } - if (r < 0.2 && substituteTeachers.length < 10) { substituteTeachers.push(user.dn); continue; } - if (r < 0.2) { teachers.push(user.dn); continue; } + if (r < 0.2) { + if (substituteTeachers.length < 10) { + substituteTeachers.push(user.dn); + } else { + teachers.push(user.dn); + } + + continue; + } students.push(user.dn); }