Skip to content
Snippets Groups Projects
Verified Commit 50d9421f authored by tribut's avatar tribut :man_dancing:
Browse files

Fix problems when engelsystem_url is not set

parent bdfb22b6
No related branches found
No related tags found
No related merge requests found
Pipeline #38968 passed
...@@ -115,7 +115,7 @@ module Pretalx ...@@ -115,7 +115,7 @@ module Pretalx
def import_engelsystem_refs(conference) def import_engelsystem_refs(conference)
unless translation_angel_id = conference.fetch_translation_angel_id unless translation_angel_id = conference.fetch_translation_angel_id
logger.warn("Could not find translation angel id for #{conference.slug}") Rails.logger.warn("Could not find translation angel id for #{conference.slug}")
return return
end end
return unless data = conference.fetch_engelsystem("angeltypes/#{translation_angel_id}/shifts") return unless data = conference.fetch_engelsystem("angeltypes/#{translation_angel_id}/shifts")
......
...@@ -131,6 +131,7 @@ class Conference < ApplicationRecord ...@@ -131,6 +131,7 @@ class Conference < ApplicationRecord
end end
def fetch_engelsystem(endpoint) def fetch_engelsystem(endpoint)
return nil unless engelsystem_url
endpoint_url = engelsystem_url + endpoint endpoint_url = engelsystem_url + endpoint
Rails.logger.debug("Querying engelsystem API at #{endpoint_url}") Rails.logger.debug("Querying engelsystem API at #{endpoint_url}")
response = HTTParty.get( response = HTTParty.get(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment