Commit 3a9fd87c authored by Jiri Strojil's avatar Jiri Strojil

Inclusive

parent eeddf05b
Pipeline #32928 passed with stage
in 35 minutes and 34 seconds
......@@ -37,9 +37,9 @@ class SemesterProcessVolunteer < ApplicationRecord
scope :active_missions, lambda {
joins(:semester_process_volunteer_missions).includes(semester_process_volunteer_missions: [:assignment, :group_assignment])
.where("semester_process_volunteer_missions.assignment_id IS NOT NULL AND (assignments.period_end IS NULL OR assignments.period_end > lower(semester_processes.semester))
.where("semester_process_volunteer_missions.assignment_id IS NOT NULL AND (assignments.period_end IS NULL OR assignments.period_end >= lower(semester_processes.semester))
OR
semester_process_volunteer_missions.group_assignment_id IS NOT NULL AND (group_assignments.period_end is NULL OR group_assignments.period_end > lower(semester_processes.semester))")
semester_process_volunteer_missions.group_assignment_id IS NOT NULL AND (group_assignments.period_end is NULL OR group_assignments.period_end >= lower(semester_processes.semester))")
.references(:assignments, :group_assignments)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment