This commit is contained in:
Karl Erik Õunapuu 2020-11-05 15:51:20 +02:00
parent 6eddbb81ad
commit e568369e36
No known key found for this signature in database
GPG key ID: C9DD647298A34764
2 changed files with 7 additions and 4 deletions

View file

@ -155,7 +155,7 @@ module Concerns::Domain::ForceDelete # rubocop:disable Metrics/ModuleLength
end end
def notify_parties(reason) def notify_parties(reason)
ent = notification_template if reason == 'ENTITY_BURIED' ent = notification_template if %w[ENTITY_BURIED EMAIL].include? reason
ent ||= reason.downcase ent ||= reason.downcase
self.template_name = ent self.template_name = ent

View file

@ -1,9 +1,12 @@
class MassAction class MassAction
def self.process(action_type, entries) def self.process(action_type, entries)
return false unless %w[force_delete].include?(action_type)
entries = CSV.read(entries, headers: true) entries = CSV.read(entries, headers: true)
process_force_delete(entries) if action_type == force_delete case action_type
when 'force_delete'
process_force_delete(entries)
else
false
end
rescue StandardError rescue StandardError
false false
end end