From 34e7de7b8b5559cf052793d08e4b2b4dc21e5ee4 Mon Sep 17 00:00:00 2001 From: PSNAppZ Date: Wed, 20 Nov 2024 18:20:07 +0530 Subject: [PATCH] Pre-commit fixes --- .../openg2p_sr_celery_workers/tasks/id_generation_request.py | 4 +--- .../openg2p_sr_celery_workers/tasks/id_generation_update.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) 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: