Commit ae9e5ac6 authored by ThibG's avatar ThibG Committed by Eugen Rochko
Browse files

Fix suspended account's fields being set as empty dict instead of list (#10178)

Fixes #10177
parent 7034bb65
...@@ -240,6 +240,7 @@ class Account < ApplicationRecord ...@@ -240,6 +240,7 @@ class Account < ApplicationRecord
def fields_attributes=(attributes) def fields_attributes=(attributes)
fields = [] fields = []
old_fields = self[:fields] || [] old_fields = self[:fields] || []
old_fields = [] if old_fields.is_a?(Hash)
if attributes.is_a?(Hash) if attributes.is_a?(Hash)
attributes.each_value do |attr| attributes.each_value do |attr|
......
...@@ -84,7 +84,7 @@ class SuspendAccountService < BaseService ...@@ -84,7 +84,7 @@ class SuspendAccountService < BaseService
@account.locked = false @account.locked = false
@account.display_name = '' @account.display_name = ''
@account.note = '' @account.note = ''
@account.fields = {} @account.fields = []
@account.statuses_count = 0 @account.statuses_count = 0
@account.followers_count = 0 @account.followers_count = 0
@account.following_count = 0 @account.following_count = 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment