Fix unnecessary query on status creation (#17901)

main
Claire 3 years ago committed by GitHub
parent 96f29ce91a
commit 25dda3061e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save