From a7dfbbd4fb036cd5680fadef5be34ddc4ac3f784 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 5 Mar 2019 05:09:01 +0100 Subject: [PATCH] Fix NoMethodError in ActivityPub::NoteSerializer (#10172) --- app/serializers/activitypub/note_serializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb index b2a5f53e05..3a9e388a5f 100644 --- a/app/serializers/activitypub/note_serializer.rb +++ b/app/serializers/activitypub/note_serializer.rb @@ -122,7 +122,7 @@ class ActivityPub::NoteSerializer < ActiveModel::Serializer end def poll_options - if !object.expired? && object.hide_totals? + if !object.poll.expired? && object.poll.hide_totals? object.poll.unloaded_options else object.poll.loaded_options