Fix tootctl feeds build
not building list timelines (#33783)
This commit is contained in:
parent
3f4f6317d4
commit
a3d2849d15
5 changed files with 95 additions and 18 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue