Update app/services/create_collection_service.rb

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
David Roetzel 2025-11-27 09:04:35 +01:00 committed by GitHub
parent 48c33df8bf
commit 82dc11565e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,10 +4,7 @@ class CreateCollectionService
def call(params, account)
tag = params.delete(:tag)
account_ids = params.delete(:account_ids)
@collection = Collection.new(params)
@collection.account = account
@collection.local = true
@collection.tag = find_or_create_tag(tag)
@collection = Collection.new(params.merge({ account:, local: true, tag: find_or_create_tag(tag) }))
build_items(account_ids)
@collection.save!