Attempt to a quick correction

This commit is contained in:
echarp 2016-01-11 13:06:39 +01:00
parent 1a0e09213a
commit df6902a535
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@
version.changeset.each do |key, val|
changes += version.item_type.constantize.human_attribute_name(key)
changes += ': '
if key == 'description'
if key == 'description' && val[0].present? && val[1].present?
changes += Differ.diff(val[1], val[0]).to_s
else
changes += "#{val[0]} -> #{val[1]}"

View File

@ -60,7 +60,7 @@ xml.rdf :RDF,
version.changeset.each do |key, val|
changes += version.item_type.constantize.human_attribute_name(key)
changes += ': '
if key == 'description'
if key == 'description' && val[0].present? && val[1].present?
changes += Differ.diff(val[1], val[0]).to_s
else
changes += "#{val[0]} -> #{val[1]}"