Skip to content

Commit

Permalink
Replace nil or empty checks with blank? method
Browse files Browse the repository at this point in the history
  • Loading branch information
jvendetti committed May 4, 2023
1 parent 0cb0ade commit 3198c68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/admin_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def refresh_ontologies_report
else
response = response_json

if params['ontologies'].nil? || params['ontologies'].empty?
if params['ontologies'].blank?
response[:success] = 'Refresh of ontologies report started successfully'
else
ontologies = params['ontologies'].split(',').map { |o| o.strip }
Expand Down Expand Up @@ -263,7 +263,7 @@ def _process_ontology(ontology, params)
def _process_ontologies(success_keyword, error_keyword, process_proc)
response = { errors: '', success: '' }

if params['ontologies'].nil? || params['ontologies'].empty?
if params['ontologies'].blank?
response[:errors] = "No ontologies parameter passed. Syntax: ?ontologies=ONT1,ONT2,...,ONTN"
else
ontologies = params['ontologies'].split(',').map { |o| o.strip }
Expand Down

0 comments on commit 3198c68

Please sign in to comment.