mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-02 21:57:17 +00:00
fix nil error if no proxy orders found
This commit is contained in:
@@ -16,7 +16,7 @@ namespace :ofn do
|
||||
|
||||
# Reset Proxy Orders of the Order Cycle
|
||||
# by detatching them from existing orders and resetting placed and confirmed dates
|
||||
ProxyOrder.find_by(order_cycle_id: order_cycle_id).update(order_id: nil,
|
||||
ProxyOrder.find_by(order_cycle_id: order_cycle_id)&.update(order_id: nil,
|
||||
confirmed_at: nil,
|
||||
placed_at: nil)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user