Skip to content

Commit

Permalink
better pilots birthdate importing from excel file
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Golfari committed Jun 20, 2023
1 parent 3bff2a7 commit 5e90936
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion airscore/core/pilot/participant.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ def extract_participants_from_excel(comp_id: int, filename, certs: list, from_CI
pil.attributes = []
pil.ID = row[0]
pil.comp_id = comp_id
pil.birthdate = None if row[4] is None else row[4].date() # row[4] should be datetime
bd = get_date(row[4] or None)
pil.birthdate = None if not isinstance(bd, datetime.date) else bd
pil.glider = abbreviate(row[5]) or None
if classes_are_certs:
pil.glider_cert = row[12]
Expand Down

0 comments on commit 5e90936

Please sign in to comment.