Skip to content

Commit

Permalink
handle missing rights text. #691
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Dec 22, 2020
1 parent 76265bd commit baf6596
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit baf6596

Please sign in to comment.