app/soc/logic/cleaning.py
changeset 2929 04851beb824e
parent 2927 ac4f93519855
child 2961 34c6737e77a0
--- a/app/soc/logic/cleaning.py	Tue Sep 15 22:23:06 2009 +0200
+++ b/app/soc/logic/cleaning.py	Tue Sep 15 22:38:01 2009 +0200
@@ -707,7 +707,7 @@
       # nothing to check, field validator will find these errors
       return cleaned_data
 
-    # get the current program entity or bail out 404
+    # get the current program entity
     entity = program_logic.getFromKeyName(program_key_name)
 
     if not entity:
@@ -718,6 +718,10 @@
     major = cleaned_data.get(major_field)
     degree = cleaned_data.get(degree_field)
 
+    # TODO: when school_type is required this can be removed
+    if not school_type:
+      raise forms.ValidationError("School type cannot be left blank.")
+
     # if school_type is University, check for major
     if school_type == 'University' and not major:
       raise forms.ValidationError("Major cannot be left blank.")