Do not crash when sorting screenshots by version if the version is empty
This commit is contained in:
parent
9603550aab
commit
bac90cbd2f
1 changed files with 2 additions and 0 deletions
|
|
@ -65,6 +65,8 @@ class Package < ActiveRecord::Base
|
|||
private
|
||||
|
||||
def version_compare(x,y)
|
||||
x ||= '0'
|
||||
y ||= '0'
|
||||
version_x = DebImporter::Version.new(x)
|
||||
version_y = DebImporter::Version.new(y)
|
||||
if version_x<version_y
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue