about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-01-13 23:24:02 -0600
committermultiple creatures <dev@multiple-creature.party>2020-01-13 23:24:02 -0600
commitd8242376296a8d72d27ffb0b462390d031f1f435 (patch)
tree0c0668b9635af72b1cdd8b22687b059e75ef68b9 /app/models
parent400ff50dbca05149ce3c8dbda3d8277d5fdc1b69 (diff)
use `update` instead of assignment on `delete_after=` & `defederate_after=`
Diffstat (limited to 'app/models')
-rw-r--r--app/models/status.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index f21a2087e..6ab33c9b4 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -292,7 +292,7 @@ class Status < ApplicationRecord
     if destructing_status.nil?
       DestructingStatus.create!(status_id: id, delete_after: Time.now.utc + value)
     else
-      destructing_status.delete_after = Time.now.utc + value
+      destructing_status.update(delete_after: Time.now.utc + value)
     end
   end
 
@@ -306,7 +306,7 @@ class Status < ApplicationRecord
     if defederating_status.nil?
       DefederatingStatus.create!(status_id: id, defederate_after: Time.now.utc + value)
     else
-      defederating_status.defederate_after = Time.now.utc + value
+      defederating_status.update(defederate_after: Time.now.utc + value)
     end
   end