'Get the source class from the class name'

def clean_source(self):

    source = self.cleaned_data['source']
    classes = dict(((cls.name, cls) for cls in self.notification_classes))
    return classes.get(source, None)
