Skip to content

Commit

Permalink
fix empty ldapDns WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorCapCoder committed Sep 25, 2023
1 parent ee43c77 commit a8fbe10
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/services/sync/strategies/consumerActions/ClassAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ class ClassAction extends BaseConsumerAction {
const teachers = [];
const ldapDns = !Array.isArray(uniqueMembers) ? [uniqueMembers] : uniqueMembers;

const users = await UserRepo.findByLdapDnsAndSchool(ldapDns, schoolId);
let users = [];
if (ldapDns) {
const users = await UserRepo.findByLdapDnsAndSchool(ldapDns, schoolId);
}

users.forEach((user) => {
user.roles.forEach((role) => {
Expand Down

0 comments on commit a8fbe10

Please sign in to comment.