Skip to content

Commit

Permalink
Fix deleting a scheduled status immediately deleting media attachments (
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron authored and hiyuki2578 committed Oct 2, 2019
1 parent 3ab50b7 commit 5d7b921
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/scheduled_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5d7b921

Please sign in to comment.