Skip to content

Commit

Permalink
Fix option to send e-mail notification about account action always be…
Browse files Browse the repository at this point in the history
…ing true (mastodon#11242)
  • Loading branch information
Gargron authored and hiyuki2578 committed Oct 2, 2019
1 parent 45280b9 commit c2f3114
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/models/admin/account_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ class Admin::AccountAction
:type,
:text,
:report_id,
:warning_preset_id,
:send_email_notification
:warning_preset_id

attr_reader :warning
attr_reader :warning, :send_email_notification

def send_email_notification=(value)
@send_email_notification = ActiveModel::Type::Boolean.new.cast(value)
end

def save!
ApplicationRecord.transaction do
Expand Down

0 comments on commit c2f3114

Please sign in to comment.