diff --git a/app/models/group_order.rb b/app/models/group_order.rb index 10eda019..25c3ac5e 100644 --- a/app/models/group_order.rb +++ b/app/models/group_order.rb @@ -22,7 +22,7 @@ class GroupOrder < ActiveRecord::Base # Generate some data for the javascript methods in ordering view def load_data data = {} - data[:account_balance] = ordergroup.account_balance + data[:account_balance] = ordergroup.nil? ? BigDecimal.new('+Infinity') : ordergroup.account_balance data[:available_funds] = ordergroup.nil? ? BigDecimal.new('+Infinity') : ordergroup.get_available_funds(self) # load prices and other stuff....