Commit eeddf05b authored by Jiri Strojil's avatar Jiri Strojil

Lower instead of upper

parent 31f42839
Pipeline #32927 passed with stage
in 36 minutes and 3 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 > upper(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 > upper(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