Skip to content
Snippets Groups Projects
Unverified Commit 088dc0ec authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Fix regression in `tootctl search deploy` caused by unloaded attribute (#18514)

parent a4fa9e23
No related branches found
No related tags found
No related merge requests found
......@@ -39,13 +39,12 @@ class Poll < ApplicationRecord
before_validation :prepare_options, if: :local?
before_validation :prepare_votes_count
after_initialize :prepare_cached_tallies
before_validation :prepare_cached_tallies
after_commit :reset_parent_cache, on: :update
def loaded_options
options.map.with_index { |title, key| Option.new(self, key.to_s, title, show_totals_now? ? cached_tallies[key] : nil) }
options.map.with_index { |title, key| Option.new(self, key.to_s, title, show_totals_now? ? (cached_tallies[key] || 0) : nil) }
end
def possibly_stale?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment