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

Update search functionality for exact matches #129

Merged
merged 7 commits into from
Nov 19, 2023

Conversation

mgmgperson
Copy link
Contributor

Description

Fixed issue where exact searches would return values even if the filters did not match to any course.

Closes #[REPLACE WITH ISSUE NUMBER]

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Test A
  • Test B

Test Configuration:

  • Node.js version:
  • Python version:
  • Desktop/Mobile:
  • OS:
  • Browser:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

This pull request updates the Prisma Client from its current version to 5.6. This upgrade addresses several bugs that were identified in the previous versions, including a critical issue with the unit filter functionality.
Comment on lines 26 to 30
const filteredCourses = pageCourses.filter(
(courseID) => !exactResultsCourses.includes(courseID)
);

if(pageCourses.includes(exactResultsCourses[0])) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since filteredCourses is only required in the if case, let's try and optimize this by moving the filteredCourses inside the if case. It might be expensive to compute filteredCourses.

Copy link
Collaborator

@Lhwhatever Lhwhatever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@Lhwhatever Lhwhatever merged commit 5731674 into ScottyLabs:main Nov 19, 2023
1 check passed
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.

2 participants