From: W. Trevor King Date: Thu, 1 Jul 2010 05:14:41 +0000 (-0400) Subject: Allow degrees() == None in colleges() X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d3ead17231b7aaf76f54d42820f86dfb38e42e0f;p=sitecorepy.git Allow degrees() == None in colleges() --- diff --git a/sitecore/prof/__init__.py b/sitecore/prof/__init__.py index 5226181..68e6499 100644 --- a/sitecore/prof/__init__.py +++ b/sitecore/prof/__init__.py @@ -150,7 +150,10 @@ class Professor (AttributeHolder): return '|'.join(degrees) def colleges(self): - titles = self.degrees().split('|') + d = self.degrees() + if d == None: + return None + titles = d.split('|') return '|'.join([g.college for g in self.graduations if g.title in titles])