-
Notifications
You must be signed in to change notification settings - Fork 6
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
Course duplicates removed from future semesters #50
Conversation
@gmfenech is attempting to deploy a commit to the Max Isom's projects Team on Vercel. A member of the Team first needs to authorize it. |
src/lib/state/api.ts
Outdated
for (const course of this.courses) { | ||
if (!course.deletedAt) { | ||
if (!course.deletedAt && !courses.some(existingCourse => `${existingCourse.subject}${existingCourse.crse}` === `${course.subject}${course.crse}`)) { |
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 is quite an expensive check (O(n^2)), let's use a Set
also, could you provide an example of the bug? I haven't seen it before so curious what it looks like
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.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #50 +/- ##
==========================================
- Coverage 31.84% 31.81% -0.04%
==========================================
Files 105 105
Lines 2490 2496 +6
Branches 410 410
==========================================
+ Hits 793 794 +1
- Misses 1640 1645 +5
Partials 57 57 ☔ View full report in Codecov by Sentry. |
Fixed on the backend. |
When viewing future semesters it will show multiple of the same courses. This may be due to it pulling courses from all past semesters.