67 # only if there is an application send out the invites |
67 # only if there is an application send out the invites |
68 properties = { |
68 properties = { |
69 'scope': entity, |
69 'scope': entity, |
70 'scope_path': entity.key().name(), |
70 'scope_path': entity.key().name(), |
71 'role': 'org_admin', |
71 'role': 'org_admin', |
72 'role_verbose' : 'Organization Admin', |
72 'role_verbose': 'Organization Admin', |
73 'status': 'group_accepted', |
73 'status': 'group_accepted', |
74 } |
74 } |
75 |
75 |
76 for admin in [application.applicant, application.backup_admin]: |
76 for admin in [application.applicant, application.backup_admin]: |
77 properties['link_id'] = admin.link_id |
77 properties['link_id'] = admin.link_id |
78 key_fields = request_logic.logic.getKeyFieldsFromFields(properties) |
78 key_fields = request_logic.logic.getKeyFieldsFromFields(properties) |
79 request_logic.logic.updateOrCreateFromFields(properties, key_fields) |
79 request_logic.logic.updateOrCreateFromFields(properties, key_fields) |
80 |
80 |
81 # set the application to completed |
81 # set the application to completed |
82 fields = {'status' : 'completed'} |
82 fields = {'status': 'completed'} |
83 org_app_logic.logic.updateEntityProperties(application, fields) |
83 org_app_logic.logic.updateEntityProperties(application, fields) |
84 |
84 |
85 super(Logic, self)._onCreate(entity) |
85 super(Logic, self)._onCreate(entity) |
86 |
86 |
87 logic = Logic() |
87 logic = Logic() |