From 05d8ccff3a3484f866fec06b87d85497fa396f6f Mon Sep 17 00:00:00 2001 From: shivamg9 Date: Wed, 20 Mar 2024 20:09:28 +0530 Subject: [PATCH] Added company_id field in PartnerORM --- src/openg2p_portal_api/models/orm/partner_orm.py | 1 + src/openg2p_portal_api/services/partner_service.py | 1 + 2 files changed, 2 insertions(+) diff --git a/src/openg2p_portal_api/models/orm/partner_orm.py b/src/openg2p_portal_api/models/orm/partner_orm.py index 32fb65b..453919e 100644 --- a/src/openg2p_portal_api/models/orm/partner_orm.py +++ b/src/openg2p_portal_api/models/orm/partner_orm.py @@ -24,6 +24,7 @@ class PartnerORM(BaseORMModelWithId): birth_place: Mapped[str] = mapped_column() notification_preference: Mapped[str] = mapped_column() phone: Mapped[str] = mapped_column() + company_id: Mapped[Optional[int]] = mapped_column() reg_ids: Mapped[Optional[List[RegIDORM]]] = relationship(back_populates="partner") diff --git a/src/openg2p_portal_api/services/partner_service.py b/src/openg2p_portal_api/services/partner_service.py index bfe0f78..7b33fee 100644 --- a/src/openg2p_portal_api/services/partner_service.py +++ b/src/openg2p_portal_api/services/partner_service.py @@ -45,6 +45,7 @@ async def check_and_create_partner( "is_registrant": True, "is_group": False, "active": True, + "company_id":1, } partner_dict["name"] = self.create_partner_process_name( partner_dict["family_name"],