def get_university(domain):
for university in university_list:
if domain in university["domains"]:
return university
for university in university_list:
for raw_domain in university["domains"]:
if domain.endswith(raw_domain) or raw_domain.endswith(domain):
return university
return None
The problem is in the above function - get_university. If the domain is sc.edu University of South Carolina, and the raw_domain is wisc.edu University of Wisconsin - Madison, it would return true in the comparison
The problem is in the above function - get_university. If the domain is sc.edu University of South Carolina, and the raw_domain is wisc.edu University of Wisconsin - Madison, it would return true in the comparison