diff --git a/app/models/experiment.rb b/app/models/experiment.rb index 2e018c077..8b0735a18 100644 --- a/app/models/experiment.rb +++ b/app/models/experiment.rb @@ -70,11 +70,7 @@ class Experiment < ActiveRecord::Base .where('experiments.project_id IN (?)', projects_ids) .where_attributes_like([:name], a_query) .limit(Constants::ATWHO_SEARCH_LIMIT) - if include_archived - return new_query - else - return new_query.is_archived(false) - end + return include_archived ? new_query : new_query.is_archived(false) elsif include_archived new_query = Experiment