Fixed a bug in club and org logic.
This bug would give an error when no backup was set.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- a/app/soc/logic/models/club.py Thu Feb 12 23:26:23 2009 +0000
+++ b/app/soc/logic/models/club.py Thu Feb 12 23:35:44 2009 +0000
@@ -65,6 +65,9 @@
}
for admin in [application.applicant, application.backup_admin]:
+ if not admin:
+ continue
+
properties['link_id'] = admin.link_id
key_fields = request_logic.logic.getKeyFieldsFromFields(properties)
request_logic.logic.updateOrCreateFromFields(properties, key_fields)
--- a/app/soc/logic/models/organization.py Thu Feb 12 23:26:23 2009 +0000
+++ b/app/soc/logic/models/organization.py Thu Feb 12 23:35:44 2009 +0000
@@ -74,6 +74,9 @@
}
for admin in [application.applicant, application.backup_admin]:
+ if not admin:
+ continue
+
properties['link_id'] = admin.link_id
key_fields = request_logic.logic.getKeyFieldsFromFields(properties)
request_logic.logic.updateOrCreateFromFields(properties, key_fields)