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:
parent
fce026d09b
commit
0a656767c7
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue