Call send_expiry_notification with single arguments instead of tuples
This commit is contained in:
@@ -57,14 +57,22 @@ def cleanup_expired(app):
|
||||
app.dns_service.delete_record(hostname.hostname, hostname.zone, "AAAA")
|
||||
|
||||
if app.email_service:
|
||||
last_ipv4 = (hostname.last_ipv4, hostname.last_ipv4_update) if ipv4_expired else None
|
||||
last_ipv6 = (hostname.last_ipv6, hostname.last_ipv6_update) if ipv6_expired else None
|
||||
last_ipv4 = last_ipv4_update = None
|
||||
if ipv4_expired:
|
||||
last_ipv4 = hostname.last_ipv4
|
||||
last_ipv4_update = hostname.last_ipv4_update
|
||||
last_ipv6 = last_ipv6_update = None
|
||||
if ipv6_expired:
|
||||
last_ipv6 = hostname.last_ipv6
|
||||
last_ipv6_update = hostname.last_ipv6_update
|
||||
|
||||
app.email_service.send_expiry_notification(
|
||||
hostname.user.email,
|
||||
f"{hostname.hostname}.{hostname.zone}",
|
||||
last_ipv4,
|
||||
last_ipv4_update,
|
||||
last_ipv6,
|
||||
last_ipv6_update,
|
||||
hostname.expiry_ttl
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user