fix user projects filter bug

dev_course
p31729568 6 years ago
parent 7ddd0c4f5d
commit ab6c1bd682

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

Loading…
Cancel
Save