-
Notifications
You must be signed in to change notification settings - Fork 17
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
N21 1309 fix empty class sync #4443
Conversation
test/services/sync/strategies/consumerActions/ClassAction.test.js
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
@@ -90,14 +90,16 @@ class ClassAction extends BaseConsumerAction { | |||
const teachers = []; | |||
const ldapDns = !Array.isArray(uniqueMembers) ? [uniqueMembers] : uniqueMembers; | |||
|
|||
const users = await UserRepo.findByLdapDnsAndSchool(ldapDns, schoolId); | |||
if (ldapDns[0]) { |
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.
I think it should return here in case condition is not a valid DN to skip execute the extra update class with empty teacher and students
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.
Actually this is needed to fix current classes, which have been affected already
* handle empty, null and undefined lists * change scope of unique members assertion to fix current classes
Description
handles empty and undefined ldapDns for user search in ldap class sync.
Links to Tickets or other pull requests
Changes
Datasecurity
Deployment
New Repos, NPM pakages or vendor scripts
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.