0
0
Fork 0

Fix tootctl feeds build not building list timelines (#33783)

This commit is contained in:
Claire 2025-01-30 10:18:46 +01:00 committed by GitHub
parent 3f4f6317d4
commit a3d2849d15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 95 additions and 18 deletions

View file

@ -24,6 +24,7 @@ class List < ApplicationRecord
has_many :list_accounts, inverse_of: :list, dependent: :destroy
has_many :accounts, through: :list_accounts
has_many :active_accounts, -> { merge(ListAccount.active) }, through: :list_accounts, source: :account
validates :title, presence: true

View file

@ -20,6 +20,8 @@ class ListAccount < ApplicationRecord
validates :account_id, uniqueness: { scope: :list_id }
validate :validate_relationship
scope :active, -> { where.not(follow_id: nil) }
before_validation :set_follow, unless: :list_owner_account_is_account?
private