Fix NameError

pull/1/head
Luca 2 years ago
parent f9da38e4f1
commit 021c11aefd

@ -14,7 +14,7 @@ class SMS:
self.sender = item["source"] self.sender = item["source"]
def list_incoming_sms(from_date=None): def list_incoming_sms(from_dt=None):
if not settings.SIPGATE_INCOMING_TOKEN_ID: if not settings.SIPGATE_INCOMING_TOKEN_ID:
raise RuntimeError("required setting SIPGATE_INCOMING_TOKEN_ID is not set") raise RuntimeError("required setting SIPGATE_INCOMING_TOKEN_ID is not set")
@ -28,7 +28,7 @@ def list_incoming_sms(from_date=None):
"types": "SMS", "types": "SMS",
} }
if from_date is not None: if from_dt is not None:
params["from"] = ( params["from"] = (
from_dt.astimezone(timezone.utc).isoformat(timespec="seconds") + "Z" from_dt.astimezone(timezone.utc).isoformat(timespec="seconds") + "Z"
) )

Loading…
Cancel
Save