Fixed terms and conditions bug.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Thu, 03 Sep 2009 18:52:01 +0530
changeset 19 6af9056ccac9
parent 18 07408d1ced76
child 20 272dced1685b
Fixed terms and conditions bug.
upload/forms.py
--- a/upload/forms.py	Thu Sep 03 18:37:48 2009 +0530
+++ b/upload/forms.py	Thu Sep 03 18:52:01 2009 +0530
@@ -18,13 +18,15 @@
   def clean(self):
     """Form cleaner for accepting the terms and conditions.
     """
-    cleaned_data = self.cleaned_data
-    accept = cleaned_data.get('accept')
+
+    data = self.data
+    accept = data.get('accept')
+    
     if not accept:
       raise forms.ValidationError(
           'You need to accept the terms and condition for uploading the data.')
 
-    return cleaned_data
+    return self.cleaned_data
 
   class Meta:
     model = Participant