Skip to content

Commit e83cf35

Browse files
committed
patch
1 parent f03fe35 commit e83cf35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/util/dynamo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ def preprocess_profile(profile: dict) -> dict:
3232
# meta attributes for easy querying
3333
preprocessed_profile['_meta_highest_yearEnded'] = highest_year_by_level
3434
preprocessed_profile['_meta_highest_gpa'] = highest_gpa_by_level
35-
preprocessed_profile['_meta_majors'] = list(set([x['major'][0] for x in degrees]))
36-
preprocessed_profile['_meta_minors'] = list(set([x['minor'][0] for x in degrees]))
35+
preprocessed_profile['_meta_majors'] = list(set([x['major'][0] for x in degrees if 'major' in x and len(x['major']) > 0]))
36+
preprocessed_profile['_meta_minors'] = list(set([x['minor'][0] for x in degrees if 'minor' in x and len(x['minor']) > 0]))
3737

3838
return preprocessed_profile
3939

0 commit comments

Comments
 (0)