Make sure Bundle#ends_at is set before validation

otherwise we risk creating overlapping bundles and not catching it.
This commit is contained in:
Mike Dalessio
2025-11-22 22:19:05 -05:00
parent 31266699cb
commit a29dd89683
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ class Notification::Bundle < ApplicationRecord
)
end
before_create :set_default_window
before_validation :set_default_window, if: :new_record?
validate :validate_no_overlapping