-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EW-999 adding school change and classes provisioning to tsp sync #5237
base: main
Are you sure you want to change the base?
Conversation
|
||
private static getBaseProps(): ClassProps { | ||
return { | ||
id: '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty IDs are dangerous. Create a new one already here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
private readonly accountService: AccountService | ||
) {} | ||
|
||
public async findSchoolOrFail(system: ProvisioningSystemDto, school: ExternalSchoolDto): Promise<School> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds like a function that should rather exists in the SchoolModule, but I won't insist on it now
if (existingUser && school.externalId === data.externalSchool?.externalId) { | ||
// Case: User exists and school is the same -> update user | ||
user = await this.updateUser(existingUser, data.externalUser, roleRefs, school.id); | ||
} else if (existingUser && school.id !== data.externalSchool?.externalId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be school.externalId?
} else if (existingUser && school.id !== data.externalSchool?.externalId) { | |
} else if (existingUser && school.externalId !== data.externalSchool?.externalId) { | |
schoolId: string | ||
): Promise<UserDO> { | ||
if (!externalUser.firstName || !externalUser.lastName || !externalUser.email) { | ||
throw new BadDataLoggableException('User firstname, lastname and email is missing', { externalUser }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new BadDataLoggableException('User firstname, lastname and email is missing', { externalUser }); | |
throw new BadDataLoggableException('User firstname, lastname or email is missing', { externalUser }); | |
Quality Gate failedFailed conditions |
Description
Adding class provisioning and school change functionality during a tsp sync.
Links to Tickets or other pull requests
Approval for review
generate-client:server
was executed in vue frontend and changes were tested and put in a PR with the same branch name.