2
0
Fork 0

Fix NameError

This commit is contained in:
Luca 2023-05-07 02:24:38 +02:00
parent f9da38e4f1
commit 021c11aefd
1 changed files with 2 additions and 2 deletions

View File

@ -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"
) )