Force update in Order#finish; rescue if error raised

This commit is contained in:
Julius 2013-10-08 19:58:11 +02:00
parent 1b49a08c5e
commit 28644dc334
2 changed files with 3 additions and 1 deletions

View file

@ -155,7 +155,7 @@ class Order < ActiveRecord::Base
unless finished?
Order.transaction do
# set new order state (needed by notify_order_finished)
update_attributes(:state => 'finished', :ends => Time.now, :updated_by => user)
update_attributes!(:state => 'finished', :ends => Time.now, :updated_by => user)
# Update order_articles. Save the current article_price to keep price consistency
# Also save results for each group_order_result