about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-06-05 00:17:38 +0200
committerGitHub <noreply@github.com>2018-06-05 00:17:38 +0200
commitbd0791d800902cdbdf6666e65d201df3ec22789c (patch)
tree3cb41294e095396df9158b5558952a1b5dc72c2e /app/models
parent5fb013878fa7cb82c887d5215b2d6c8294db6b21 (diff)
Add redraft function (#7735)
* Add redraft function

Fix #7010

* Add explicit confirmation

* Add explicit confirmation message
Diffstat (limited to 'app/models')
-rw-r--r--app/models/status.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index b256069f7..5189e173d 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -52,7 +52,7 @@ class Status < ApplicationRecord
   has_many :reblogs, foreign_key: 'reblog_of_id', class_name: 'Status', inverse_of: :reblog, dependent: :destroy
   has_many :replies, foreign_key: 'in_reply_to_id', class_name: 'Status', inverse_of: :thread
   has_many :mentions, dependent: :destroy
-  has_many :media_attachments, dependent: :destroy
+  has_many :media_attachments, dependent: :nullify
 
   has_and_belongs_to_many :tags
   has_and_belongs_to_many :preview_cards