This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Fix suspended account's fields being set as empty dict instead of list (
#10178
)
Fixes
#10177
pull/4/head
ThibG
5 years ago
committed by
Eugen Rochko
parent
ac99b3465e
commit
d785497ba5
2 changed files
with
2 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-0
app/models/account.rb
+1
-1
app/services/suspend_account_service.rb
+ 1
- 0
app/models/account.rb
View File
@ -241,6 +241,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
|
+ 1
- 1
app/services/suspend_account_service.rb
View File
@ -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
Loading…
Cancel
Save