--- a/app/soc/logic/helper/notifications.py Sun Apr 12 12:31:55 2009 +0000
+++ b/app/soc/logic/helper/notifications.py Sun Apr 12 13:14:03 2009 +0000
@@ -125,6 +125,9 @@
template = DEF_NEW_GROUP_TEMPLATE
for to in [entity.applicant, entity.backup_admin]:
+ if not to:
+ continue
+
sendNotification(to, None, message_properties, subject, template)
--- a/app/soc/views/helper/access.py Sun Apr 12 12:31:55 2009 +0000
+++ b/app/soc/views/helper/access.py Sun Apr 12 13:14:03 2009 +0000
@@ -1115,7 +1115,8 @@
application = app_logic.getFromKeyFieldsOr404(django_args)
applicant = application.applicant.key()
- backup_admin = application.backup_admin.key()
+ backup_admin = application.backup_admin
+ backup_admin = backup_admin.key() if backup_admin else None
user = self.user.key()
# check if the application is accepted and the applicant is the current user
--- a/app/soc/views/models/org_app.py Sun Apr 12 12:31:55 2009 +0000
+++ b/app/soc/views/models/org_app.py Sun Apr 12 13:14:03 2009 +0000
@@ -243,6 +243,9 @@
context['subject'] = 'Thank you for your application'
for to in [admin_entity, backup_entity]:
+ if not to:
+ continue
+
email = accounts.denormalizeAccount(to.account).email()
context['to'] = email
context['to_name'] = to.name