FIX: optimise querying Post's serializer ignored attribute (#7169)
This commit is contained in:
parent
fc0cf3ecd1
commit
6f6dea87f3
app/serializers
|
@ -45,7 +45,7 @@ class BasicPostSerializer < ApplicationSerializer
|
|||
|
||||
def ignored
|
||||
object.is_first_post? && IgnoredUser.where(user_id: scope.current_user&.id,
|
||||
ignored_user_id: object.user_id).present?
|
||||
ignored_user_id: object.user_id).exists?
|
||||
end
|
||||
|
||||
def include_name?
|
||||
|
|
Loading…
Reference in New Issue