Swap to iteration for now, so callbacks are happy

This commit is contained in:
Daniel O'Connor committed 2025-08-10 02:21:39 +00:00
1 parent 3b17265a92
commit 67a2005f1e
1 file changed
+3
+3
View File
@@ -15,6 +15,9 @@ namespace :openfarm do
photos_to_delete = Photo.where(source: 'openfarm')
count = photos_to_delete.count
photos_to_delete.each do |photo|
photo.associations.each do |photo_association|
photo_association.delete
end
photo.delete
end
puts "Deleted #{count} pictures."