fix: custom_domain deleted error (#2245)

This commit is contained in:
Carlos Quintana 2024-10-02 09:45:54 +02:00 committed by GitHub
parent 940db18383
commit ed5e62d479
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -247,12 +247,13 @@ def process_job(job: Job):
domain_name = custom_domain.domain
user = custom_domain.user
custom_domain_partner_id = custom_domain.partner_id
CustomDomain.delete(custom_domain.id)
Session.commit()
LOG.d("Domain %s deleted", domain_name)
if custom_domain.partner_id is None:
if custom_domain_partner_id is None:
send_email(
user.email,
f"Your domain {domain_name} has been deleted",