Verified Commit 7b526b6f authored by Kaspar Vollenweider's avatar Kaspar Vollenweider
Browse files

fix(semester-scope): meeting date scoped with DateTime caused day overlap

So a scope with DateTime 2019-12-01T00:00:00.0000Z turned out to match
hour meeting date 2019-11-30. Converting that DateTime to date solved the problem.
parent 89fb944b
Pipeline #90022 failed with stages
in 8 minutes and 59 seconds
......@@ -65,8 +65,8 @@ class Hour < ApplicationRecord
scope :semester_with_date, lambda { |date|
date_between_inclusion(
:meeting_date,
date,
date.advance(months: BillingExpense::SEMESTER_LENGTH)
date.to_date,
date.advance(months: BillingExpense::SEMESTER_LENGTH).advance(days: -1).to_date
)
}
......
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