Skip to content

Commit

Permalink
Merge pull request #548 from ONLYOFFICE/fix/ruby-conversion-progress
Browse files Browse the repository at this point in the history
fix(ruby): conversion percent type validation. Fix Bug 66869
  • Loading branch information
LinneyS authored Mar 14, 2024
2 parents 717996a + 66389fe commit 65ff78f
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,13 @@ def self.get_response_data(json_data)

percent_element = file_result['percent'] # get the percentage value

result_percent = Integer(percent_element, 10) unless percent_element.nil?
result_percent = unless percent_element.nil?
if percent_element.is_a?(String)
Integer(percent_element, 10)
else
Integer(percent_element)
end
end

result_percent = 99 if result_percent >= 100

Expand Down

0 comments on commit 65ff78f

Please sign in to comment.