Fix database query on cleanup
This commit is contained in:
@@ -22,7 +22,7 @@ def cleanup_expired(app, start_time=None):
|
|||||||
now = now_utc()
|
now = now_utc()
|
||||||
expired_count = 0
|
expired_count = 0
|
||||||
|
|
||||||
for hostname in Hostname.select(Hostname, User.email).join(User).where(
|
for hostname in Hostname.select(Hostname, User).join(User).where(
|
||||||
(Hostname.expiry_ttl != 0) &
|
(Hostname.expiry_ttl != 0) &
|
||||||
((Hostname.last_ipv4.is_null(False) & Hostname.last_ipv4_update.is_null(False)) |
|
((Hostname.last_ipv4.is_null(False) & Hostname.last_ipv4_update.is_null(False)) |
|
||||||
(Hostname.last_ipv6.is_null(False) & Hostname.last_ipv6_update.is_null(False)))):
|
(Hostname.last_ipv6.is_null(False) & Hostname.last_ipv6_update.is_null(False)))):
|
||||||
|
|||||||
Reference in New Issue
Block a user