mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Fix unnecessary query on status creation (#17901)
This commit is contained in:
parent
96f29ce91a
commit
25dda3061e
@ -454,7 +454,7 @@ class Status < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def set_poll_id
|
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
|
end
|
||||||
|
|
||||||
def set_visibility
|
def set_visibility
|
||||||
|
Loading…
Reference in New Issue
Block a user