From d08fc095f7267c7abd62edd5b6c169fe51e3f56e Mon Sep 17 00:00:00 2001 From: Vivek Kumar Pandey Date: Thu, 19 Oct 2023 19:21:37 +0530 Subject: [PATCH] adding language_id when registration is created --- api/services/registration_service.py | 4 ++-- config.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/services/registration_service.py b/api/services/registration_service.py index d28bffe..dc0e2e6 100644 --- a/api/services/registration_service.py +++ b/api/services/registration_service.py @@ -1,7 +1,6 @@ # This file is treated as service layer -from api import helpers, models, db +from api import helpers, models, app, db from datetime import datetime -from api import app from utils.loggingutils import logger @@ -49,6 +48,7 @@ def create_registration(self, data): program_id=program_id, status="pending", partner_id=partner.partner_id, + language_id=app.config["DEFAULT_LANGUAGE_ID"], state=system_phone_data.state, has_dropped_missedcall=True, created_on=data["log_created_on"] diff --git a/config.py b/config.py index c2ba8c2..d07abdb 100644 --- a/config.py +++ b/config.py @@ -42,4 +42,5 @@ DEFAULT_PROGRAM_TIME_CATEGORY = "AFTERNOON" RETRY_LOGS_BATCH_LIMIT = os.environ.get("RETRY_LOGS_BATCH_LIMIT", 1000) TELCO_CODE_ANSWERED = 16 +DEFAULT_LANGUAGE_ID = 1 MAX_RETRY_ATTEMPTS_FOR_LOGS = os.environ.get("MAX_RETRY_ATTEMPTS_FOR_LOGS", 3)