From 045bb91fb09fedb6baea5ea7ab9b926ad8943ecf Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 26 Jun 2010 21:07:27 -0400 Subject: [PATCH] Allow for empty prof['degrees'] in export_mysql --- sitecore/prof/export_mysql.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sitecore/prof/export_mysql.py b/sitecore/prof/export_mysql.py index ba6bece..a7701c5 100644 --- a/sitecore/prof/export_mysql.py +++ b/sitecore/prof/export_mysql.py @@ -174,7 +174,10 @@ Where the relevant categories are if prof['position1'] != None: p.title += ', %s' % prof['position1'] p.graduations = [] - for degree in prof['degrees'].splitlines(): + degrees = [] + if prof['degrees'] != None: + degrees = prof['degrees'].splitlines() + for degree in degrees: m = GRADUATION_REGEXP.match(degree.strip()) assert m != None, 'Misformed graduation: %s' % degree title,field,college,comma_year,year = m.groups() -- 2.26.2