Skip to content

Commit 8adf459

Browse files
Make school teacher ID lookup deterministic
Co-authored-by: Chris Zetter <zetter-rpf@users.noreply.github.com>
1 parent d1145c8 commit 8adf459

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/concepts/school_teacher/list.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class List
55
class << self
66
def call(school:, teacher_ids: nil)
77
response = OperationResponse.new
8-
teacher_ids = school.roles.where(role: :teacher)&.pluck(:user_id) if teacher_ids.blank?
8+
teacher_ids = school.roles.where(role: :teacher).order(:id).pluck(:user_id) if teacher_ids.blank?
99
response[:school_teachers] = list_teachers(teacher_ids)
1010
response
1111
rescue StandardError => e

0 commit comments

Comments
 (0)