Skip to content

Commit

Permalink
Handle bad birthdates
Browse files Browse the repository at this point in the history
  • Loading branch information
shrir committed Nov 11, 2024
1 parent 1182482 commit b4993b5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/domain/opportunities/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,14 @@ async def scan(
if person_details.get("github_url"):
github_profile_url = "https://" + person_details.get("github_url").rstrip("/")
if person_details.get("birth_date"):
birth_date = datetime.strptime(person_details.get("birth_date"), "%Y-%m-%d").date()
try:
birth_date = datetime.strptime(person_details.get("birth_date"), "%Y-%m-%d").date()
except Exception as e:
logger.warn(
"Failed to parse birth date for a person",
person_details=person_details,
exc_info=e,
)

if person_details.get("work_email"):
if get_domain_from_email(person_details.get("work_email", "")) == get_domain(
Expand Down

0 comments on commit b4993b5

Please sign in to comment.