Fixes an error occurring when editing a User as Developer when the ToS have been signed.
authorLennard de Rijk <ljvderijk@gmail.com>
Sun, 01 Feb 2009 17:31:09 +0000
changeset 1159 3fefc88b0965
parent 1158 eefda5105ecd
child 1160 56070e3badea
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
app/soc/views/models/user.py
--- 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'),