From 6937e2e7aa37c41b9d6dba2dd37d9d4642418c26 Mon Sep 17 00:00:00 2001 From: jacobherrington Date: Sun, 4 Aug 2019 15:03:28 -0500 Subject: [PATCH] Remove a duplicate method call --- core/app/models/spree/shipping_manifest.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/app/models/spree/shipping_manifest.rb b/core/app/models/spree/shipping_manifest.rb index 0d87fcbb4b0..7af71688391 100644 --- a/core/app/models/spree/shipping_manifest.rb +++ b/core/app/models/spree/shipping_manifest.rb @@ -21,9 +21,9 @@ def items states = {} units.group_by(&:state).each { |state, iu| states[state] = iu.count } - line_item = units.first.line_item - variant = units.first.variant - ManifestItem.new(line_item, variant, units.length, states) + first_unit = units.first + + ManifestItem.new(first_unit.line_item, first_unit.variant, units.length, states) end end.flatten end