1
0
mirror of https://github.com/mastodon/mastodon synced 2024-12-01 08:18:22 +09:00

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

Fix #10177 for real
This commit is contained in:
ThibG 2019-03-08 19:59:08 +01:00 committed by Eugen Rochko
parent d36fcb54c4
commit 3f4a6d44fe

View File

@ -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: '' }