Skip to content

Commit b79ef4a

Browse files
authored
Filter out duplicate student ids when loading work (#455)
## Status - Closes _add issue numbers or delete_ - Related to _add issue numbers or delete_ ## Points for consideration: - Security - Performance ## What's changed? _Description of what's been done - bullets are often best_ ## Steps to perform after deploying to production _If the production environment requires any extra work after this PR has been deployed detail it here. This could be running a Rake task, a migration, or upgrading a Gem. That kind of thing._
1 parent 7558b06 commit b79ef4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/project.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Project < ApplicationRecord
3131

3232
def self.users(current_user)
3333
school = School.find_by(id: pluck(:school_id))
34-
SchoolStudent::List.call(school:, token: current_user.token, student_ids: pluck(:user_id))[:school_students] || []
34+
SchoolStudent::List.call(school:, token: current_user.token, student_ids: pluck(:user_id).uniq)[:school_students] || []
3535
end
3636

3737
def self.with_users(current_user)

0 commit comments

Comments
 (0)