@@ -63,16 +63,17 @@ def extract_badges_for_hackathon(hackathon, issue_date, format='json'):
6363
6464 badges .setdefault ('facilitators' , [])
6565 for team in hackathon .teams .all ():
66- badges ['facilitators' ].append ({
67- 'first_name' : team .mentor .first_name ,
68- 'name' : team .mentor .full_name or team .mentor .slack_display_name ,
69- 'email' : team .mentor .email ,
70- 'issue_date' : issue_date ,
71- 'team' : team .display_name ,
72- 'project' : team .project .display_name if team .project else '' ,
73- 'award' : 'Hackathon Facilitators' ,
74- 'award_ranking' : 'n/a' ,
75- })
66+ if team .mentor :
67+ badges ['facilitators' ].append ({
68+ 'first_name' : team .mentor .first_name ,
69+ 'name' : team .mentor .full_name or team .mentor .slack_display_name ,
70+ 'email' : team .mentor .email ,
71+ 'issue_date' : issue_date ,
72+ 'team' : team .display_name ,
73+ 'project' : team .project .display_name if team .project else '' ,
74+ 'award' : 'Hackathon Facilitators' ,
75+ 'award_ranking' : 'n/a' ,
76+ })
7677
7778 projects = [team .project for team in hackathon .teams .all ()
7879 if team .project ]
0 commit comments