app/soc/views/models/role.py
changeset 1948 25cd704fdfdf
parent 1947 af360d1017df
child 1955 06ed84dbb1ed
equal deleted inserted replaced
1947:af360d1017df 1948:25cd704fdfdf
   267 
   267 
   268     # create the request entity
   268     # create the request entity
   269     entity = request_logic.logic.updateOrCreateFromKeyName(request_fields,
   269     entity = request_logic.logic.updateOrCreateFromKeyName(request_fields,
   270                                                            key_name)
   270                                                            key_name)
   271 
   271 
   272     # send out an invite notification
       
   273     notifications_helper.sendInviteNotification(entity)
       
   274 
       
   275     group_view = params.get('group_view')
   272     group_view = params.get('group_view')
   276     if not group_view:
   273     if not group_view:
   277       return http.HttpResponseRedirect('/')
   274       return http.HttpResponseRedirect('/')
   278     else:
   275     else:
   279       # redirect to the requests list
   276       # redirect to the requests list
   616         # only update when the status is changing
   613         # only update when the status is changing
   617         if request_status != request_entity.status:
   614         if request_status != request_entity.status:
   618           request_logic.logic.updateEntityProperties(request_entity, {
   615           request_logic.logic.updateEntityProperties(request_entity, {
   619               'status': get_dict['status']})
   616               'status': get_dict['status']})
   620 
   617 
   621           if request_status == 'group_accepted':
       
   622             notifications_helper.sendInviteNotification(request_entity)
       
   623 
       
   624         group_view = params.get('group_view')
   618         group_view = params.get('group_view')
   625         if not group_view:
   619         if not group_view:
   626           return http.HttpResponseRedirect('/')
   620           return http.HttpResponseRedirect('/')
   627         else:
   621         else:
   628           # redirect to the requests list
   622           # redirect to the requests list