diff --git a/app/models/doi.rb b/app/models/doi.rb index b5b650ad8..3c1d77b7e 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -1779,7 +1779,7 @@ def check_dates def check_rights_list Array.wrap(rights_list).each do |r| errors.add(:rights_list, "Rights '#{r}' should be an object instead of a string.") unless r.is_a?(Hash) - errors.add(:rights_list, "Rights should not have a length of more than 2000 characters.") if r["rights"].length > 2000 + errors.add(:rights_list, "Rights should not have a length of more than 2000 characters.") if r["rights"].to_s.length > 2000 end end