File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ def preprocess_profile(profile: dict) -> dict:
32
32
# meta attributes for easy querying
33
33
preprocessed_profile ['_meta_highest_yearEnded' ] = highest_year_by_level
34
34
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 ]))
37
37
38
38
return preprocessed_profile
39
39
You can’t perform that action at this time.
0 commit comments