Allow degrees() == None in colleges() master
authorW. Trevor King <wking@drexel.edu>
Thu, 1 Jul 2010 05:14:41 +0000 (01:14 -0400)
committerW. Trevor King <wking@drexel.edu>
Thu, 1 Jul 2010 05:14:41 +0000 (01:14 -0400)
sitecore/prof/__init__.py

index 5226181c8f0e5fa6e9a1a561cc55eab6fc614c33..68e649920ad49146ad82ecd3e4066976cf1d96b7 100644 (file)
@@ -150,7 +150,10 @@ class Professor (AttributeHolder):
         return '|'.join(degrees)
 
     def colleges(self):
         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])
 
         return '|'.join([g.college for g in self.graduations
                          if g.title in titles])