From c2c7eb5e6d6fa0b6f5abaf4b3e092b937ec6e8bf Mon Sep 17 00:00:00 2001 From: philip Date: Wed, 29 Dec 2021 17:10:25 +0300 Subject: [PATCH] Adds ability to select language before creating account. --- apps/cic-ussd/cic_ussd/db/models/account.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/cic-ussd/cic_ussd/db/models/account.py b/apps/cic-ussd/cic_ussd/db/models/account.py index 505f822b..1d09e2ea 100644 --- a/apps/cic-ussd/cic_ussd/db/models/account.py +++ b/apps/cic-ussd/cic_ussd/db/models/account.py @@ -171,7 +171,7 @@ class Account(SessionBase): return check_password_hash(password, self.password_hash) -def create(chain_str: str, phone_number: str, session: Session): +def create(chain_str: str, phone_number: str, session: Session, preferred_language: str): """ :param chain_str: :type chain_str: @@ -179,12 +179,14 @@ def create(chain_str: str, phone_number: str, session: Session): :type phone_number: :param session: :type session: + :param preferred_language: + :type preferred_language: :return: :rtype: """ api = Api(callback_task='cic_ussd.tasks.callback_handler.account_creation_callback', callback_queue='cic-ussd', - callback_param='', + callback_param=preferred_language, chain_str=chain_str) task_uuid = api.create_account().id TaskTracker.add(session=session, task_uuid=task_uuid)