1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-27 22:38:42 +09:00

Fix deleting a scheduled status immediately deleting media attachments (#9728)

This commit is contained in:
Eugen Rochko 2019-01-06 16:38:40 +01:00 committed by GitHub
parent 1cbdf8d218
commit 86f27b178c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@ class ScheduledStatus < ApplicationRecord
DAILY_LIMIT = 25
belongs_to :account, inverse_of: :scheduled_statuses
has_many :media_attachments, inverse_of: :scheduled_status, dependent: :destroy
has_many :media_attachments, inverse_of: :scheduled_status, dependent: :nullify
validate :validate_future_date
validate :validate_total_limit