Unpublish & archive working but destroy results in this error FrozenError (can't modify frozen String: ""). Tried unpublishing and/or archiving first, but destroy still failed. Is there some other config or process to destroy entries?
module ContentfulAdapter
module Management
module DeleteEntries
module_function
def delete_all(entry_type:)
cms_client = ContentfulAdapter::Management::CreateClient.call
space = cms_client.spaces.find(ENV['CONTENTFUL_SPACE'])
entries = space.entries.all(content_type: entry_type)
entries.each do |entry|
entry.unpublish
entry.destroy
end
end
end
end
end
Unpublish & archive working but destroy results in this error
FrozenError (can't modify frozen String: ""). Tried unpublishing and/or archiving first, but destroy still failed. Is there some other config or process to destroy entries?