Skip to content

Commit c2f3114

Browse files
Gargronhiyuki2578
authored andcommitted
Fix option to send e-mail notification about account action always being true (mastodon#11242)
1 parent 45280b9 commit c2f3114

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

app/models/admin/account_action.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ class Admin::AccountAction
1717
:type,
1818
:text,
1919
:report_id,
20-
:warning_preset_id,
21-
:send_email_notification
20+
:warning_preset_id
2221

23-
attr_reader :warning
22+
attr_reader :warning, :send_email_notification
23+
24+
def send_email_notification=(value)
25+
@send_email_notification = ActiveModel::Type::Boolean.new.cast(value)
26+
end
2427

2528
def save!
2629
ApplicationRecord.transaction do

0 commit comments

Comments
 (0)