mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
reset_processed_at adds guard clause
This commit is contained in:
@@ -280,6 +280,8 @@ class OrderCycle < ApplicationRecord
|
||||
end
|
||||
|
||||
def reset_processed_at
|
||||
return unless orders_close_at.present? && orders_close_at_was.present?
|
||||
|
||||
self.processed_at = nil if orders_close_at > orders_close_at_was
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user