From 3575dd3e70c0b845583bad8657f30c704d169960 Mon Sep 17 00:00:00 2001 From: Dev Aggarwal Date: Tue, 16 Jul 2024 23:00:43 +0530 Subject: [PATCH] fix typo twilio_account_sid --- daras_ai_v2/twilio_bot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/daras_ai_v2/twilio_bot.py b/daras_ai_v2/twilio_bot.py index 322fe7901..589406439 100644 --- a/daras_ai_v2/twilio_bot.py +++ b/daras_ai_v2/twilio_bot.py @@ -20,7 +20,7 @@ def __init__(self, data: dict): if account_sid == settings.TWILIO_ACCOUNT_SID: account_sid = "" bi = BotIntegration.objects.get( - account_sid=account_sid, twilio_phone_number=data["To"][0] + twilio_account_sid=account_sid, twilio_phone_number=data["To"][0] ) self.convo = Conversation.objects.get_or_create( bot_integration=bi, twilio_phone_number=data["From"][0] @@ -93,19 +93,19 @@ def from_data(cls, data: dict): account_sid = data["AccountSid"][0] if account_sid == settings.TWILIO_ACCOUNT_SID: account_sid = "" - + account_sid logger.debug(data) user_number, bot_number = data["From"][0], data["To"][0] try: # cases where user is calling the bot bi = BotIntegration.objects.get( - account_sid=account_sid, twilio_phone_number=bot_number + twilio_account_sid=account_sid, twilio_phone_number=bot_number ) except BotIntegration.DoesNotExist: # cases where bot is calling the user user_number, bot_number = bot_number, user_number bi = BotIntegration.objects.get( - account_sid=account_sid, twilio_phone_number=bot_number + twilio_account_sid=account_sid, twilio_phone_number=bot_number ) convo = Conversation.objects.get_or_create(