mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-31 06:31:41 +00:00
Add Bugsnag notice when an OC closes during checkout completion
This info could be useful to know whilst debugging order completion issues.
This commit is contained in:
@@ -153,9 +153,11 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
def check_order_cycle_expiry
|
||||
if current_order_cycle&.closed?
|
||||
Bugsnag.notify("Notice: order cycle closed during checkout completion", order: current_order)
|
||||
current_order.empty!
|
||||
current_order.set_order_cycle! nil
|
||||
flash[:info] = I18n.t('order_cycle_closed')
|
||||
|
||||
redirect_to main_app.shop_path
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user