From 83c46a3f088bfa3ebf023c4339c08a335a23cdec Mon Sep 17 00:00:00 2001 From: higs4281 Date: Thu, 19 Oct 2017 12:34:20 -0400 Subject: [PATCH] Fix script to handle longer ZIP code values The College Scorecard API started using longer ZIP code forms, so we need to truncate them because our app uses 5-digit codes. --- paying_for_college/disclosures/scripts/update_colleges.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paying_for_college/disclosures/scripts/update_colleges.py b/paying_for_college/disclosures/scripts/update_colleges.py index aa34aea..2050274 100644 --- a/paying_for_college/disclosures/scripts/update_colleges.py +++ b/paying_for_college/disclosures/scripts/update_colleges.py @@ -32,7 +32,7 @@ def fix_zip5(zip5): if len(zip5) == 3: return "00{0}".format(zip5) else: - return zip5 + return zip5[:5] def update(exclude_ids=[], single_school=None):