Skip to content

Commit 3a2182b

Browse files
committed
district dropdown: fix unit tests that used district_name which is gone.
1 parent 7a988d5 commit 3a2182b

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

dashboard/app/controllers/api/v1/pd/workshop_attendance_controller.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ def create_teacher(email)
5050
school: enrollment.school
5151
}
5252
teacher = User.find_or_create_teacher(params, current_user)
53-
district = District.find_by_name(enrollment.district_name)
54-
DistrictsUsers.create!(district_id: district.id, user_id: teacher.id) if district
5553

5654
teacher
5755
end

dashboard/app/serializers/api/v1/pd/workshop_enrollment_serializer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class Api::V1::Pd::WorkshopEnrollmentSerializer < ActiveModel::Serializer
2-
attributes :name, :email, :district_name, :school, :user_id
2+
attributes :name, :email, :school_district_id, :school, :user_id
33

44
def user_id
55
object.user ? object.user.id : nil

0 commit comments

Comments
 (0)