@@ -114,7 +114,7 @@ class StudentActivityServiceImpl(
114
114
val studentActivity = studentActivityRepository.findByIdOrNull(id)
115
115
? : throw StudentActivityNotFoundException (" 학생 활동을 찾을 수 없습니다. info : [ studentActivityId = $id ]" )
116
116
117
- if (student.id != studentActivity.student.id )
117
+ if (student != studentActivity.student)
118
118
throw ForbiddenStudentActivityException (" 해당 학생 활동에 대한 권한이 없습니다. info : [ studentId = ${student.id} ]" )
119
119
120
120
studentActivityRepository.delete(studentActivity)
@@ -134,7 +134,7 @@ class StudentActivityServiceImpl(
134
134
val studentActivity = studentActivityRepository.findByIdOrNull(id)
135
135
? : throw StudentActivityNotFoundException (" 학생 활동을 찾을 수 없습니다. info : [ studentActivityId = $id ]" )
136
136
137
- if (teacher.id != studentActivity.teacher.id )
137
+ if (teacher != studentActivity.teacher)
138
138
throw ForbiddenStudentActivityException (" 해당 학생 활동에 대한 권한이 없습니다. info : [ teacherId = ${teacher.id} ]" )
139
139
140
140
studentActivityRepository.delete(studentActivity)
@@ -154,7 +154,7 @@ class StudentActivityServiceImpl(
154
154
val studentActivity = studentActivityRepository.findByIdOrNull(id)
155
155
? : throw StudentActivityNotFoundException (" 학생 활동을 찾을 수 없습니다. info : [ studentActivityId = $id ]" )
156
156
157
- if (teacher.id != studentActivity.teacher.id )
157
+ if (teacher != studentActivity.teacher)
158
158
throw ForbiddenStudentActivityException (" 해당 학생 활동에 대한 권한이 없습니다. info : [ teacherId = ${teacher.id} ]" )
159
159
160
160
val updatedStudentActivity = StudentActivity (
0 commit comments