Fix Rails/WhereExists cop in REST::TagSerializer model (#28790)

This commit is contained in:
Matt Jankowski 2024-01-19 04:35:58 -05:00 committed by GitHub
parent 329911b0a3
commit 4ec7d7d989
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View file

@ -19,7 +19,7 @@ class REST::TagSerializer < ActiveModel::Serializer
if instance_options && instance_options[:relationships]
instance_options[:relationships].following_map[object.id] || false
else
TagFollow.where(tag_id: object.id, account_id: current_user.account_id).exists?
TagFollow.exists?(tag_id: object.id, account_id: current_user.account_id)
end
end