Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Commit

Permalink
Merge pull request #425 from chipp/master
Browse files Browse the repository at this point in the history
Fix value stripping for localized metadata values
  • Loading branch information
KrauseFx committed Oct 14, 2015
2 parents a7d9780 + 82140e3 commit 1bf1e60
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/deliver/upload_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down

0 comments on commit 1bf1e60

Please sign in to comment.