Skip to content
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

Merged
merged 13 commits into from
Oct 6, 2023
Merged

Conversation

IgorCapCoder
Copy link
Contributor

@IgorCapCoder IgorCapCoder commented Sep 27, 2023

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

  • DEV: If api was changed - generate-client:server was executed in vue frontend and changes were tested and put in a PR with the same branch name.
  • QA: In addition to review, the code has been manually tested (if manual testing is possible)
  • All points were discussed with the ticket creator, support-team or product owner. The code upholds all quality guidelines from the PR-template.

Notice: Please remove the WIP label if the PR is ready to review, otherwise nobody will review it.

@IgorCapCoder IgorCapCoder added the WIP This feature branch is in progress, do not merge into master. label Sep 27, 2023
@IgorCapCoder IgorCapCoder removed the WIP This feature branch is in progress, do not merge into master. label Sep 27, 2023
@IgorCapCoder IgorCapCoder added the WIP This feature branch is in progress, do not merge into master. label Sep 28, 2023
@Loki-Afro Loki-Afro self-requested a review October 4, 2023 15:06
@IgorCapCoder IgorCapCoder removed the WIP This feature branch is in progress, do not merge into master. label Oct 5, 2023
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

warning 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.
Read more here

@IgorCapCoder IgorCapCoder enabled auto-merge (squash) October 5, 2023 11:29
@@ -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]) {
Copy link
Contributor

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

Copy link
Contributor Author

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

@IgorCapCoder IgorCapCoder merged commit 6f7f09c into main Oct 6, 2023
44 of 45 checks passed
@IgorCapCoder IgorCapCoder deleted the N21-1309-fix-empty-class-sync branch October 6, 2023 05:45
virgilchiriac pushed a commit that referenced this pull request Oct 6, 2023
* handle empty, null and undefined lists
* change scope of unique members assertion to fix current classes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants