From ac99b3465e3e0eff44c88f7c557dcc12eafff389 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 b2a5f53e05a..3a9e388a5f3 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