Skip to content

Commit

Permalink
email check added
Browse files Browse the repository at this point in the history
  • Loading branch information
jaanbaaz committed Dec 15, 2024
1 parent 163e7d7 commit 3dfb1e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion helpers/supabaseClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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 = (
Expand Down

0 comments on commit 3dfb1e8

Please sign in to comment.