Fix setting up fields of a previously suspended account (#10222)

Fix #10177 for real
lolsob-rspec
ThibG 2019-03-08 19:59:08 +01:00 committed by Eugen Rochko
parent f461d0a193
commit 32f0cc5ccd
1 changed files with 1 additions and 0 deletions

View File

@ -266,6 +266,7 @@ class Account < ApplicationRecord
return if fields.size >= DEFAULT_FIELDS_SIZE return if fields.size >= DEFAULT_FIELDS_SIZE
tmp = self[:fields] || [] tmp = self[:fields] || []
tmp = [] if tmp.is_a?(Hash)
(DEFAULT_FIELDS_SIZE - tmp.size).times do (DEFAULT_FIELDS_SIZE - tmp.size).times do
tmp << { name: '', value: '' } tmp << { name: '', value: '' }