- $empty_collection = Collection.
- where(uuid: empty_collection_uuid).
- first_or_create!(owner_uuid: anonymous_group_uuid,
- manifest_text: '')
+ ActiveRecord::Base.transaction do
+ $empty_collection = Collection.
+ where(uuid: empty_collection_uuid).
+ first_or_create!(manifest_text: '')
+ Link.where(tail_uuid: anonymous_group.uuid,
+ head_uuid: empty_collection_uuid,
+ link_class: 'permission',
+ name: 'can_read').first_or_create!
+ end