1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

M #-: fix minor bug in onedb (#2202)

(cherry picked from commit a11afb17462d9132f246d64513600091b59a8807)
This commit is contained in:
Alejandro Huertas Herrero 2022-06-29 16:07:54 +02:00 committed by Ruben S. Montero
parent f01b28e763
commit 8b86848a7e
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -760,14 +760,14 @@ class OneDB
shared_upgrade = Gem::Version.new(shared) < Gem::Version.new(source)
local_upgrade = Gem::Version.new(local) < Gem::Version.new(source_local)
# Both need to be lower than current version as sometimes the DB schema
# One needs to be lower than current version as sometimes the DB schema
# have been increased only for local or shared.
return [true, 2] if shared_upgrade && local_upgrade
return [true, 2] if shared_upgrade || local_upgrade
shared_new = Gem::Version.new(shared) > Gem::Version.new(source)
local_new = Gem::Version.new(local) > Gem::Version.new(source_local)
# Both version should be lower or equal than source.
# Both version should be higher than source.
return [true, 3] if shared_new || local_new
[false, 0]