about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-03-08 19:59:08 +0100
committerEugen Rochko <eugen@zeonfederated.com>2019-03-08 19:59:08 +0100
commit3f4a6d44fe8366dc4d71501dc2d799d641af4687 (patch)
treeac3fb89f48561c962e4675cecc77491751438c87 /app/models
parentd36fcb54c408536f15de1346f70b4a8c78e9cb34 (diff)
Fix setting up fields of a previously suspended account (#10222)
Fix #10177 for real
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 b1abd8f0d..b81c64182 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -266,6 +266,7 @@ class Account < ApplicationRecord
     return if fields.size >= DEFAULT_FIELDS_SIZE
 
     tmp = self[:fields] || []
+    tmp = [] if tmp.is_a?(Hash)
 
     (DEFAULT_FIELDS_SIZE - tmp.size).times do
       tmp << { name: '', value: '' }