|
|
@ -65,7 +65,7 @@ class Users::SubjectService
|
|
|
|
when 'finished' then subjects.having('finished = 1').map(&:id)
|
|
|
|
when 'finished' then subjects.having('finished = 1').map(&:id)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
relations.where(id: subject_ids) if subject_ids.present?
|
|
|
|
relations = relations.where(id: subject_ids) if subject_ids.present?
|
|
|
|
relations
|
|
|
|
relations
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
@ -75,7 +75,7 @@ class Users::SubjectService
|
|
|
|
when 'applying' then 1
|
|
|
|
when 'applying' then 1
|
|
|
|
when 'published' then 2
|
|
|
|
when 'published' then 2
|
|
|
|
end
|
|
|
|
end
|
|
|
|
relations.where(status: status) if status
|
|
|
|
relations = relations.where(status: status) if status
|
|
|
|
relations
|
|
|
|
relations
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|