about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-03-05 15:19:54 +0100
committerEugen Rochko <eugen@zeonfederated.com>2019-03-05 15:19:54 +0100
commitd785497ba5ed44e794dd67660b8779380f81ef42 (patch)
tree5e5e1a037c1d56f8065fc79f41c266628e7e83ac /app/models
parentac99b3465e3e0eff44c88f7c557dcc12eafff389 (diff)
Fix suspended account's fields being set as empty dict instead of list (#10178)
Fixes #10177
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb1
1 files changed, 1 insertions, 0 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|