Commit a89b2621 authored by Marco Sehrer's avatar Marco Sehrer
Browse files

Fix sample api did not find a shared collection

parent 53e7fac1
......@@ -11,7 +11,7 @@ module Chemotion
end
get do
if(params[:collection_id])
current_user.collections.find(params[:collection_id]).samples
Collection.where("user_id = ? OR shared_by_id = ?", current_user.id, current_user.id).find(params[:collection_id]).samples
else
Sample.all
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment