Fixes an error occurring when editing a User as Developer when the ToS have been signed.
By disabling the input of the field Django will not attempt to wrongly parse it as a DateTime instance.
Patch by: Haoyu Bai
Reviewed by: Lennard de Rijk
--- a/app/soc/views/models/user.py Sun Feb 01 17:21:46 2009 +0000
+++ b/app/soc/views/models/user.py Sun Feb 01 17:31:09 2009 +0000
@@ -87,7 +87,8 @@
'link_id': forms.CharField(widget=widgets.ReadOnlyInput(),
required=True),
'clean_link_id': cleaning.clean_link_id('link_id'),
- 'agreed_to_tos_on' : forms.CharField(widget=widgets.ReadOnlyInput(),
+ 'agreed_to_tos_on' : forms.DateTimeField(
+ widget=widgets.ReadOnlyInput(attrs={'disabled':'true'}),
required=False),
'status' : forms.ChoiceField(choices=status_choices),
'clean_account': cleaning.clean_user_account('account'),