From d8242376296a8d72d27ffb0b462390d031f1f435 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 13 Jan 2020 23:24:02 -0600 Subject: use `update` instead of assignment on `delete_after=` & `defederate_after=` --- app/models/status.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models') 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 -- cgit