Fixed an error in group_app view that didnt let you create a new application.
authorLennard de Rijk <ljvderijk@gmail.com>
Tue, 03 Feb 2009 20:18:15 +0000
changeset 1204 ce51d1e6ac65
parent 1203 38225f2ad3a6
child 1205 2e88261aba72
Fixed an error in group_app view that didnt let you create a new application. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed
app/soc/views/models/group_app.py
--- a/app/soc/views/models/group_app.py	Tue Feb 03 15:18:40 2009 +0000
+++ b/app/soc/views/models/group_app.py	Tue Feb 03 20:18:15 2009 +0000
@@ -117,7 +117,8 @@
 
       user_entity = user_logic.logic.getForCurrentAccount()
 
-      if group_app_entity.applicant.key() != user_entity.key():
+      if group_app_entity and (
+          group_app_entity.applicant.key() != user_entity.key()):
         # someone else is applying remove the existing group application
         group_app_logic.logic.delete(group_app_entity)