mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
util for naive dt parsing
This commit is contained in:
@@ -67,6 +67,7 @@ from app.main.forms import (
|
||||
from app.utils import DELIVERED_STATUSES, FAILURE_STATUSES, SENDING_STATUSES
|
||||
from app.utils.branding import NHS_EMAIL_BRANDING_ID
|
||||
from app.utils.branding import get_email_choices as get_email_branding_choices
|
||||
from app.utils.time import parse_naive_dt
|
||||
from app.utils.user import (
|
||||
user_has_permissions,
|
||||
user_is_gov_user,
|
||||
@@ -440,7 +441,7 @@ def get_service_verify_reply_to_address_partials(service_id, notification_id):
|
||||
is_default=is_default
|
||||
)
|
||||
seconds_since_sending = (
|
||||
datetime.utcnow() - dateutil.parser.parse(notification['created_at'], ignoretz=True)
|
||||
datetime.utcnow() - parse_naive_dt(notification['created_at'])
|
||||
).seconds
|
||||
if notification["status"] in FAILURE_STATUSES or (
|
||||
notification["status"] in SENDING_STATUSES and
|
||||
|
||||
Reference in New Issue
Block a user