core(minor): fix timezone warning when cleaning nonces
This commit is contained in:
parent
78c74cd469
commit
f9babe7089
|
@ -1,5 +1,5 @@
|
|||
"""passbook core tasks"""
|
||||
from datetime import datetime
|
||||
from django.utils.timezone import now
|
||||
|
||||
from structlog import get_logger
|
||||
|
||||
|
@ -11,5 +11,5 @@ LOGGER = get_logger()
|
|||
@CELERY_APP.task()
|
||||
def clean_nonces():
|
||||
"""Remove expired nonces"""
|
||||
amount, _ = Nonce.objects.filter(expires__lt=datetime.now(), expiring=True).delete()
|
||||
amount, _ = Nonce.objects.filter(expires__lt=now(), expiring=True).delete()
|
||||
LOGGER.debug("Deleted expired nonces", amount=amount)
|
||||
|
|
Reference in New Issue