diff --git a/helpers/supabaseClient.py b/helpers/supabaseClient.py index 098e8e3..fea1cda 100644 --- a/helpers/supabaseClient.py +++ b/helpers/supabaseClient.py @@ -410,7 +410,7 @@ async def updateContributor(self, contributor: Member, table_class=None): "discord_username": contributor["name"], "chapter": chapters[0] if chapters else None, "gender": gender, - "email": contributor["email"], + "email": contributor["email"] if contributor["email"] else "", "is_active": contributor["is_active"], "joined_at": contributor["joined_at"].replace(tzinfo=None), # Ensure naive datetime } @@ -420,6 +420,8 @@ async def updateContributor(self, contributor: Member, table_class=None): result = await session.execute(stmt) existing_record = result.scalars().first() + print('existing record ', existing_record) + if existing_record: # Update existing record stmt = (