File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,6 +94,8 @@ def upcoming
9494 end
9595
9696 before_save do
97+ # To avoid constantly changing the start date of the reminder_schedule, only update the schedule if something has actually
98+ # changed.
9799 if should_update_reminder_schedule
98100 self . reminder_schedule = create_schedule
99101 end
Original file line number Diff line number Diff line change @@ -20,7 +20,11 @@ class PartnerGroup < ApplicationRecord
2020 has_and_belongs_to_many :item_categories
2121
2222 before_save do
23- self . reminder_schedule = create_schedule
23+ # To avoid constantly changing the start date of the reminder_schedule, only update the schedule if something has actually
24+ # changed.
25+ if should_update_reminder_schedule
26+ self . reminder_schedule = create_schedule
27+ end
2428 end
2529
2630 validates :name , presence : true , uniqueness : { scope : :organization }
You can’t perform that action at this time.
0 commit comments