DomainCron: Don't send force delete mail if template empty

This commit is contained in:
Karl Erik Õunapuu 2020-10-20 15:48:35 +03:00
parent 510e981b04
commit 6e72bb03b3
No known key found for this signature in database
GPG key ID: C9DD647298A34764
2 changed files with 16 additions and 1 deletions

View file

@ -15,7 +15,7 @@ module Concerns
domain.registrar.notifications.create!(text: I18n.t('grace_period_started_domain',
domain_name: domain.name,
date: domain.force_delete_start))
send_mail(domain)
send_mail(domain) if domain.template_name.present?
domain.update(contact_notification_sent_date: Time.zone.today)
end