Skip to content

Commit

Permalink
remove binding.pry from final federation code
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed May 10, 2024
1 parent e471100 commit 9429eea
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def domain_ontology_set
subdomain = host_parts[0].downcase

slices = LinkedData::Client::Models::Slice.all
slices_acronyms = slices.map {|s| s.acronym} rescue binding.pry
slices_acronyms = slices.map {|s| s.acronym}

# Set custom ontologies if we're on a subdomain that has them
# Else, make sure user ontologies are set appropriately
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/concerns/submission_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def ontologies_filter_url(filters, page: 1, count: false)
def filter_using_data(ontologies, query:, status:, show_views:, private_only:, languages:, page_size:, formality_level:, is_of_type:, groups:, categories:, formats:)
submissions = LinkedData::Client::Models::OntologySubmission.all(include: BROWSE_ATTRIBUTES.join(','), also_include_views: true, display_links: false, display_context: false)

submissions = submissions.map { |x| [x[:ontology][:id], x] }.to_h rescue binding.pry
submissions = submissions.map { |x| [x[:ontology][:id], x] }.to_h

submissions = ontologies.map { |ont| ontology_hash(ont, submissions) }

Expand Down
2 changes: 1 addition & 1 deletion app/helpers/federation_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module FederationHelper

def federated_portals
$FEDERATED_PORTALS
$FEDERATED_PORTALS || {}
end

def federated_portal_config(name_key)
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/ontologies_api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
config.debug_client = $DEBUG_RUBY_CLIENT || false
config.debug_client_keys = $DEBUG_RUBY_CLIENT_KEYS || []
config.apikey = $API_KEY
config.federated_portals = $FEDERATED_PORTALS || []
config.federated_portals = $FEDERATED_PORTALS || {}
end

0 comments on commit 9429eea

Please sign in to comment.