mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 18:45:41 +01:00
Fix suspended account's fields being set as empty dict instead of list (#10178)
Fixes #10177
This commit is contained in:
parent
7034bb65d6
commit
ae9e5ac6c8
2 changed files with 2 additions and 1 deletions
|
@ -240,6 +240,7 @@ class Account < ApplicationRecord
|
|||
def fields_attributes=(attributes)
|
||||
fields = []
|
||||
old_fields = self[:fields] || []
|
||||
old_fields = [] if old_fields.is_a?(Hash)
|
||||
|
||||
if attributes.is_a?(Hash)
|
||||
attributes.each_value do |attr|
|
||||
|
|
|
@ -84,7 +84,7 @@ class SuspendAccountService < BaseService
|
|||
@account.locked = false
|
||||
@account.display_name = ''
|
||||
@account.note = ''
|
||||
@account.fields = {}
|
||||
@account.fields = []
|
||||
@account.statuses_count = 0
|
||||
@account.followers_count = 0
|
||||
@account.following_count = 0
|
||||
|
|
Loading…
Reference in a new issue