Skip to content

Commit

Permalink
fix current_order
Browse files Browse the repository at this point in the history
  • Loading branch information
dedekm committed May 12, 2022
1 parent 40adec3 commit 4b88648
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/concerns/boutique/current_order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def current_order
updated_at: Time.current)
end

if order.user && (order.first_name.blank? || order.last_name.blank?)
if order && order.user && (order.first_name.blank? || order.last_name.blank?)
order.update_columns(first_name: order.first_name.presence || current_user.first_name.presence,
last_name: order.last_name.presence || current_user.last_name.presence,
updated_at: Time.current)
Expand Down

0 comments on commit 4b88648

Please sign in to comment.