- if item.class == Collection && item.owner_uuid == @object.uuid
- # Collection is owned by this project. Remove it from the project by
- # changing owner to the current user before asking for deletion.
+ if item.class == Collection
+ # Use delete API on collections
+ item.destroy
+ @removed_uuids << item.uuid
+ elsif item.owner_uuid == @object.uuid
+ # Object is owned by this project. Remove it from the project by
+ # changing owner to the current user.