diff --git a/db/migrate/20240307203039_remove_actor_moderations2.rb b/db/migrate/20240307203039_remove_actor_moderations2.rb index dabc7ed7..555a4ffe 100644 --- a/db/migrate/20240307203039_remove_actor_moderations2.rb +++ b/db/migrate/20240307203039_remove_actor_moderations2.rb @@ -3,7 +3,7 @@ # Algunes quedaron como genéricxs class RemoveActorModerations2 < ActiveRecord::Migration[6.1] def up - actor_uris = ActivityPub::Activity.where(type: 'ActivityPub::Activity::Delete').distinct.pluck(Arel.sql("content->>'object'")) + actor_uris = ActivityPub::Activity.unscope(:order).where(type: 'ActivityPub::Activity::Delete').distinct.pluck(Arel.sql("content->>'object'")) actor_ids = ActivityPub::Actor.where(uri: actor_uris).ids ActorModeration.where(actor_id: actor_ids).remove_all!