From d412a8d1f239aa93a92f420127cb3183a8bb6449 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 19 Jan 2022 22:50:01 +0100 Subject: [PATCH] Fix error when processing poll updates (#17333) Regression from #16697 --- app/services/activitypub/process_status_update_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/activitypub/process_status_update_service.rb b/app/services/activitypub/process_status_update_service.rb index e3e9b9d6ae..ed10a00635 100644 --- a/app/services/activitypub/process_status_update_service.rb +++ b/app/services/activitypub/process_status_update_service.rb @@ -78,7 +78,7 @@ class ActivityPub::ProcessStatusUpdateService < BaseService MediaAttachment.where(id: removed_media_attachments.map(&:id)).update_all(status_id: nil) MediaAttachment.where(id: added_media_attachments.map(&:id)).update_all(status_id: @status.id) - @media_attachments_changed = true if removed_media_attachments.positive? || added_media_attachments.positive? + @media_attachments_changed = true if removed_media_attachments.any? || added_media_attachments.any? end def update_poll!