Fixed two small errors.
authorLennard de Rijk <ljvderijk@gmail.com>
Sat, 31 Jan 2009 18:58:09 +0000
changeset 1127 69a9134c5c7e
parent 1126 4fc86db70a76
child 1128 18d0e10b02f7
Fixed two small errors. Removed an unnecessary edit_extra field in club.py. And made group.py call getForCurrentAccount where necessary. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/views/models/club.py
app/soc/views/models/group.py
--- a/app/soc/views/models/club.py	Sat Jan 31 18:55:34 2009 +0000
+++ b/app/soc/views/models/club.py	Sat Jan 31 18:58:09 2009 +0000
@@ -94,8 +94,6 @@
             club_logic, club_app_logic)
         }
     new_params['edit_extra_dynafields'] = {
-        'founded_by': forms.CharField(widget=widgets.ReadOnlyInput(),
-                                   required=False),
         'clean_link_id': cleaning.clean_link_id('link_id')
         }
 
--- a/app/soc/views/models/group.py	Sat Jan 31 18:55:34 2009 +0000
+++ b/app/soc/views/models/group.py	Sat Jan 31 18:58:09 2009 +0000
@@ -102,8 +102,7 @@
 
     if not entity:
       # only if we are creating a new entity we should fill in founder
-      account = users.get_current_user()
-      user = user_logic.logic.getForFields({'account': account}, unique=True)
+      user = user_logic.logic.getForCurrentAccount()
       fields['founder'] = user
 
     super(View, self)._editPost(request, entity, fields)