Fix Version field interpreting ints as BigDecimal
In some cases the "version" var would be a BigDecimal. This led to 1) versions being displayed as "1.0.2.0" instead of "1.2", and 2) versions with letters (e.g A.0) leading to a 500 error, as BigDecimal#chr doesn't exist
This commit is contained in:
parent
14170ab337
commit
3c66c315c1
@ -207,6 +207,7 @@ module DmsfUploadHelper
|
||||
|
||||
# 1 -> 1, -65 -> A
|
||||
def self.gui_version(version)
|
||||
version = version.to_i # catch the case where version is a BigDecimal
|
||||
return version if version >= 0
|
||||
(-version).chr
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user