def remove_items
@removed_uuids = []
params[:item_uuids].collect { |uuid| ArvadosBase.find uuid }.each do |item|
- if item.class == Collection or item.class == Group
+ if item.class == Collection or item.class == Group or item.class == Workflow or item.class == ContainerRequest
# Use delete API on collections and projects/groups
item.destroy
@removed_uuids << item.uuid
def destroy
while (objects = Link.filter([['owner_uuid','=',@object.uuid],
- ['tail_uuid','=',@object.uuid]])).any?
+ ['tail_uuid','=',@object.uuid]]).with_count("none")).any?
objects.each do |object|
object.destroy
end