about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/models/account.rb1
-rw-r--r--app/services/suspend_account_service.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index 87ce90178..b1abd8f0d 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -241,6 +241,7 @@ class Account < ApplicationRecord
   def fields_attributes=(attributes)
     fields     = []
     old_fields = self[:fields] || []
+    old_fields = [] if old_fields.is_a?(Hash)
 
     if attributes.is_a?(Hash)
       attributes.each_value do |attr|
diff --git a/app/services/suspend_account_service.rb b/app/services/suspend_account_service.rb
index fc3bc03a5..b2ae3a47c 100644
--- a/app/services/suspend_account_service.rb
+++ b/app/services/suspend_account_service.rb
@@ -84,7 +84,7 @@ class SuspendAccountService < BaseService
     @account.locked           = false
     @account.display_name     = ''
     @account.note             = ''
-    @account.fields           = {}
+    @account.fields           = []
     @account.statuses_count   = 0
     @account.followers_count  = 0
     @account.following_count  = 0