Skip to content
Snippets Groups Projects
Unverified Commit 25dda306 authored by Claire's avatar Claire Committed by GitHub
Browse files

Fix unnecessary query on status creation (#17901)

parent 96f29ce9
No related branches found
No related tags found
No related merge requests found
......@@ -454,7 +454,7 @@ class Status < ApplicationRecord
end
def set_poll_id
update_column(:poll_id, poll.id) unless poll.nil?
update_column(:poll_id, poll.id) if association(:poll).loaded? && poll.present?
end
def set_visibility
......
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