From: ThibG Date: Fri, 8 Mar 2019 18:59:08 +0000 (+0100) Subject: Fix setting up fields of a previously suspended account (#10222) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=3f4a6d44fe8366dc4d71501dc2d799d641af4687;p=mastodon.git Fix setting up fields of a previously suspended account (#10222) Fix #10177 for real --- 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: '' }