Browse Source

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

pull/4/head
Eugen Rochko 5 years ago
committed by GitHub
parent
commit
86f27b178c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/models/scheduled_status.rb

+ 1
- 1
app/models/scheduled_status.rb 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

Loading…
Cancel
Save