Skip to content

Commit 5d7b921

Browse files
Gargronhiyuki2578
authored andcommitted
Fix deleting a scheduled status immediately deleting media attachments (mastodon#9728)
1 parent 3ab50b7 commit 5d7b921

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/models/scheduled_status.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class ScheduledStatus < ApplicationRecord
1717
DAILY_LIMIT = 25
1818

1919
belongs_to :account, inverse_of: :scheduled_statuses
20-
has_many :media_attachments, inverse_of: :scheduled_status, dependent: :destroy
20+
has_many :media_attachments, inverse_of: :scheduled_status, dependent: :nullify
2121

2222
validate :validate_future_date
2323
validate :validate_total_limit

0 commit comments

Comments
 (0)