Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
QOTO
qoto
Commits
ae9e5ac6
Commit
ae9e5ac6
authored
Mar 05, 2019
by
ThibG
Committed by
Eugen Rochko
Mar 05, 2019
Browse files
Fix suspended account's fields being set as empty dict instead of list (#10178)
Fixes #10177
parent
7034bb65
Changes
2
Show whitespace changes
Inline
Side-by-side
app/models/account.rb
View file @
ae9e5ac6
...
...
@@ -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
|
...
...
app/services/suspend_account_service.rb
View file @
ae9e5ac6
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment