@ -50,10 +50,10 @@ class GraduationTopic < ApplicationRecord
def student_graduation_topic_status
sgt = self.student_graduation_topics
status =
if sgt.is_accepting.count == 0
2
elsif sgt.is_refused.count == self.student_graduation_topics.size
if sgt.where(status: [0, 1]).count.zero?
0
elsif sgt.is_accepting.count.zero?
else
1
end