From 82140e35af9299932cb9a2d066942b23900bb632 Mon Sep 17 00:00:00 2001 From: Vladimir Burdukov Date: Wed, 14 Oct 2015 10:08:25 +0300 Subject: [PATCH] Fix value stripping for localized metadata values --- lib/deliver/upload_metadata.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/deliver/upload_metadata.rb b/lib/deliver/upload_metadata.rb index 738066e..c9031f6 100644 --- a/lib/deliver/upload_metadata.rb +++ b/lib/deliver/upload_metadata.rb @@ -27,7 +27,7 @@ def upload(options) v = app.edit_version (LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key| - current = options[key].to_s.strip + current = options[key] next unless current unless current.kind_of?(Hash) @@ -37,8 +37,9 @@ def upload(options) current.each do |language, value| next unless value.to_s.length > 0 - v.send(key)[language] = value if LOCALISED_VERSION_VALUES.include?(key) - details.send(key)[language] = value if LOCALISED_APP_VALUES.include?(key) + strip_value = value.to_s.strip + v.send(key)[language] = strip_value if LOCALISED_VERSION_VALUES.include?(key) + details.send(key)[language] = strip_value if LOCALISED_APP_VALUES.include?(key) end end