Browse Source

fix sms batch creation

tripeur 2 years ago
parent
commit
a3460a7fa4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/api/endpoints/project.py

+ 2 - 2
app/api/endpoints/project.py

@@ -1,4 +1,4 @@
-from datetime import timedelta, datetime
+from datetime import timedelta, datetime, timezone
 from uuid import UUID
 
 from fastapi import APIRouter, Depends, HTTPException
@@ -192,7 +192,7 @@ async def create_sms_batch(
     # Get all slots
     slots = session.execute(select(Slot).where(Slot.project_id == project_id))
     sms_list = []
-    now = datetime.now()
+    now = datetime.now(timezone.utc)
     for slot in slots.scalars():
         # Replace the slot placeholder by their value
         slot_content = (