Fix with_media in account_subscribe

This commit is contained in:
noellabo 2021-08-16 15:46:01 +09:00
parent 893de7a3ce
commit 9a660db1c5

View file

@ -27,7 +27,7 @@ class AccountSubscribe < ApplicationRecord
scope :home, -> { where(list_id: nil) }
scope :list, -> { where.not(list_id: nil) }
scope :with_reblog, ->(reblog) { where(show_reblogs: true) if reblog }
scope :with_media, ->(status) { where(media_only: false) unless status.with_media? }
scope :with_media, ->(status) { where(media_only: false) unless status&.with_media? }
after_create :increment_cache_counters
after_destroy :decrement_cache_counters