# HG changeset patch # User Madhusudan.C.S # Date 1251984121 -19800 # Node ID 6af9056ccac98f90b243d0fd55e33931a12e1d40 # Parent 07408d1ced76d9226dd75458ddf4c3cd0ca3b51c Fixed terms and conditions bug. diff -r 07408d1ced76 -r 6af9056ccac9 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