Skip to content
Snippets Groups Projects
Unverified Commit c4af6be3 authored by Sébastien Gaya's avatar Sébastien Gaya Committed by GitHub
Browse files

handle non-osuny websites (#1983)

parent 60ebc03b
No related branches found
No related tags found
No related merge requests found
module Communication::Website::WithTheme
extend ActiveSupport::Concern
included do
scope :with_automatic_update, -> { where(autoupdate_theme: true) }
scope :with_manual_update, -> { where(autoupdate_theme: false) }
......@@ -33,7 +33,8 @@ module Communication::Website::WithTheme
protected
def current_theme_version
URI(theme_version_url).read
response = Faraday.get(theme_version_url)
response.status == 200 ? response.body : 'NA'
rescue
'NA'
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment