equal
deleted
inserted
replaced
231 context['error_message'] = self.DEF_INVITE_ERROR_MSG_FMT % ( |
231 context['error_message'] = self.DEF_INVITE_ERROR_MSG_FMT % ( |
232 params) |
232 params) |
233 return self.inviteGet(request, context, params, **kwargs) |
233 return self.inviteGet(request, context, params, **kwargs) |
234 |
234 |
235 # extract the key_name for the new request entity |
235 # extract the key_name for the new request entity |
236 key_fields = request_logic.logic.getKeyFieldsFromFields(request_fields) |
236 key_name = request_logic.logic.getKeyNameFromFields(request_fields) |
237 key_name = request_logic.logic.getKeyNameFromFields(key_fields) |
|
238 |
237 |
239 # create the request entity |
238 # create the request entity |
240 entity = request_logic.logic.updateOrCreateFromKeyName(request_fields, |
239 entity = request_logic.logic.updateOrCreateFromKeyName(request_fields, |
241 key_name) |
240 key_name) |
242 |
241 |
345 # make sure that this role becomes active once more in case this user |
344 # make sure that this role becomes active once more in case this user |
346 # has been reinvited |
345 # has been reinvited |
347 fields ['status'] = 'active' |
346 fields ['status'] = 'active' |
348 |
347 |
349 # get the key_name for the new entity |
348 # get the key_name for the new entity |
350 key_fields = self._logic.getKeyFieldsFromFields(fields) |
349 key_name = self._logic.getKeyNameFromFields(fields) |
351 key_name = self._logic.getKeyNameFromFields(key_fields) |
|
352 |
350 |
353 # create new Role entity |
351 # create new Role entity |
354 entity = self._logic.updateOrCreateFromKeyName(fields, key_name) |
352 entity = self._logic.updateOrCreateFromKeyName(fields, key_name) |
355 |
353 |
356 # mark the request as completed |
354 # mark the request as completed |
517 context['error_message'] = self.DEF_REQUEST_ERROR_MSG_FMT % ( |
515 context['error_message'] = self.DEF_REQUEST_ERROR_MSG_FMT % ( |
518 params) |
516 params) |
519 return self.requestGet(request, context, params, **kwargs) |
517 return self.requestGet(request, context, params, **kwargs) |
520 |
518 |
521 # extract the key_name for the new request entity |
519 # extract the key_name for the new request entity |
522 key_fields = request_logic.logic.getKeyFieldsFromFields(request_fields) |
520 key_name = request_logic.logic.getKeyNameFromFields(request_fields) |
523 key_name = request_logic.logic.getKeyNameFromFields(key_fields) |
|
524 |
521 |
525 # create the request entity |
522 # create the request entity |
526 entity = request_logic.logic.updateOrCreateFromKeyName(request_fields, key_name) |
523 entity = request_logic.logic.updateOrCreateFromKeyName(request_fields, key_name) |
527 |
524 |
528 # TODO(ljvderijk) send out a message to alert the users able to process this request |
525 # TODO(ljvderijk) send out a message to alert the users able to process this request |