Skip to content

Commit

Permalink
fix recursive quote foreign key
Browse files Browse the repository at this point in the history
  • Loading branch information
sneakers-the-rat committed Jun 30, 2024
1 parent dac6773 commit 6f4477f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Status < ApplicationRecord
with_options class_name: 'Status', optional: true do
belongs_to :thread, foreign_key: 'in_reply_to_id', inverse_of: :replies
belongs_to :reblog, foreign_key: 'reblog_of_id', inverse_of: :reblogs
belongs_to :quote, inverse_of: :quote
belongs_to :quote, inverse_of: :quoted
end

has_many :favourites, inverse_of: :status, dependent: :destroy
Expand Down Expand Up @@ -191,6 +191,7 @@ class Status < ApplicationRecord
:conversation,
:status_stat,
:preloadable_poll,
preview_cards_status: [:preview_card],
account: [:account_stat, :user],
active_mentions: { account: :account_stat },
]
Expand Down

0 comments on commit 6f4477f

Please sign in to comment.