diff --git a/openg2p-sr-celery-workers/src/openg2p_sr_celery_workers/tasks/id_generation_request.py b/openg2p-sr-celery-workers/src/openg2p_sr_celery_workers/tasks/id_generation_request.py index d0598ac..4a083c3 100644 --- a/openg2p-sr-celery-workers/src/openg2p_sr_celery_workers/tasks/id_generation_request.py +++ b/openg2p-sr-celery-workers/src/openg2p_sr_celery_workers/tasks/id_generation_request.py @@ -67,9 +67,7 @@ def id_generation_request_worker(registrant_id: str): # Update res_partner.ref_id with the MOSIP Generated ID res_partner = ( - session.query(ResPartner) - .filter(ResPartner.id == registrant_id) - .first() + session.query(ResPartner).filter(ResPartner.id == registrant_id).first() ) if not res_partner: diff --git a/openg2p-sr-celery-workers/src/openg2p_sr_celery_workers/tasks/id_generation_update.py b/openg2p-sr-celery-workers/src/openg2p_sr_celery_workers/tasks/id_generation_update.py index d0cd25e..1f127aa 100644 --- a/openg2p-sr-celery-workers/src/openg2p_sr_celery_workers/tasks/id_generation_update.py +++ b/openg2p-sr-celery-workers/src/openg2p_sr_celery_workers/tasks/id_generation_update.py @@ -41,9 +41,7 @@ def id_generation_update_worker(registrant_id: str): # Fetch res_partner to get the UIN res_partner = ( - session.query(ResPartner) - .filter(ResPartner.id == registrant_id) - .first() + session.query(ResPartner).filter(ResPartner.id == registrant_id).first() ) if not res_partner or not res_partner.ref_id: