Skip to content

Commit

Permalink
wip back skip-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mariannebost committed Sep 12, 2024
1 parent 3c9b72d commit 2cbebf9
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ const generateOrganizationLearnersUsernameAndTemporaryPassword = async function
const userIds = organizationLearners.map((organizationLearner) => organizationLearner.userId);
let users = await userRepository.getByIds(userIds);

//TODO: create new model organizationLearnersIdentity

_assertEachOrganizationLearnersBelongToOrganization({
errorMessage,
organizationId,
Expand Down Expand Up @@ -63,10 +65,7 @@ async function _generateAndUpdateUsernameForUsers({ users, userReconciliationSer
let temporaryUser = { ...user };

if (!user.username) {
const username = await userReconciliationService.createUsernameByUser(
{ firstName: user.firstName, lastName: user.lastName, birthDate: user.birthDate },
userRepository,
);
const username = await userReconciliationService.createUsernameByUser({ user, userRepository });
temporaryUser = await userRepository.updateUsername({ id: user.id, username });
}

Expand Down

0 comments on commit 2cbebf9

Please sign in to comment.