equal
deleted
inserted
replaced
22 '"Lennard de Rijk" <ljvderijk@gmail.com>', |
22 '"Lennard de Rijk" <ljvderijk@gmail.com>', |
23 ] |
23 ] |
24 |
24 |
25 |
25 |
26 from soc.logic.models import group |
26 from soc.logic.models import group |
27 from soc.logic.models import group_app as group_app_logic |
27 from soc.logic.models import club_app as club_app_logic |
28 from soc.logic.models import request as request_logic |
28 from soc.logic.models import request as request_logic |
29 |
29 |
30 import soc.models.club |
30 import soc.models.club |
31 import soc.models.group |
31 import soc.models.group |
32 |
32 |
46 def _onCreate(self, entity): |
46 def _onCreate(self, entity): |
47 """Invites the group admin and backup admin. |
47 """Invites the group admin and backup admin. |
48 """ |
48 """ |
49 |
49 |
50 # Find their application |
50 # Find their application |
51 application = group_app_logic.logic.getFromFields(link_id=entity.link_id) |
51 application = club_app_logic.logic.getFromFields(link_id=entity.link_id) |
52 |
52 |
53 if application: |
53 if application: |
54 # only if there is an application send out the invites |
54 # only if there is an application send out the invites |
55 properties = { |
55 properties = { |
56 'scope': entity, |
56 'scope': entity, |
64 key_fields = request_logic.logic.getKeyFieldsFromDict(properties) |
64 key_fields = request_logic.logic.getKeyFieldsFromDict(properties) |
65 request_logic.logic.updateOrCreateFromFields(properties, key_fields) |
65 request_logic.logic.updateOrCreateFromFields(properties, key_fields) |
66 |
66 |
67 # set the application to completed |
67 # set the application to completed |
68 fields = {'application_completed' : True} |
68 fields = {'application_completed' : True} |
69 group_app_logic.logic.updateModelProperties(application, fields) |
69 club_app_logic.logic.updateModelProperties(application, fields) |
70 |
70 |
71 |
71 |
72 logic = Logic() |
72 logic = Logic() |