Skip to content

Commit

Permalink
do not rails exception on searches with invalid colleciton identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansing committed Jul 1, 2024
1 parent 1af548f commit b249efa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/labeling/skos/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def self.single_query(params = {})
scope = scope.where("#{Collection::Member::Base.table_name}.collection_id" => collection.id)
scope = scope.references(:collection_members)
else
raise "Collection with Origin #{params[:collection_origin]} not found!"
Rails.logger.warn "Collection with Origin #{params[:collection_origin]} not found!"
end
end
scope = scope.includes(:owner)
Expand Down
2 changes: 1 addition & 1 deletion app/models/note/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def self.single_query(params = {})
scope = scope.where("#{Collection::Member::Base.table_name}.collection_id" => collection.id)
scope = scope.references(:collection_members)
else
raise "Collection with Origin #{params[:collection_origin]} not found!"
Rails.logger.warn "Collection with Origin #{params[:collection_origin]} not found!"
end
end

Expand Down

0 comments on commit b249efa

Please sign in to comment.