From 3f4a6d44fe8366dc4d71501dc2d799d641af4687 Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 8 Mar 2019 19:59:08 +0100 Subject: [PATCH] Fix setting up fields of a previously suspended account (#10222) Fix #10177 for real --- app/models/account.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/account.rb b/app/models/account.rb index b1abd8f0d81..b81c641820e 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: '' }