DEV: use Redis data for version check in DiscourseUpdates (#12293)

A version bump caused the specs to fail, this switches to using what is
stored in Redis, which is also what is stubbed in the specs.
This commit is contained in:
Penar Musaraj 2021-03-08 09:05:08 -05:00 committed by GitHub
parent fce026d09b
commit 0a656767c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ module DiscourseUpdates
return nil if entries.nil? return nil if entries.nil?
entries.select! do |item| entries.select! do |item|
item["discourse_version"].nil? || Discourse.has_needed_version?(Discourse::VERSION::STRING, item["discourse_version"]) rescue nil item["discourse_version"].nil? || Discourse.has_needed_version?(last_installed_version, item["discourse_version"]) rescue nil
end end
entries.sort_by { |item| Time.zone.parse(item["created_at"]).to_i }.reverse entries.sort_by { |item| Time.zone.parse(item["created_at"]).to_i }.reverse