Send out a Notification upon creation of a new Request entity.
The receivers are specified by the corresponding Role logic this Role Request is for. Currently Organization and Club Administrators will receive "new request" messages about respectively Mentor and Club Membership requests.
Fixes Issue 442.
--- a/app/soc/logic/models/request.py Fri Jul 24 20:57:53 2009 +0200
+++ b/app/soc/logic/models/request.py Fri Jul 24 21:00:04 2009 +0200
@@ -68,8 +68,7 @@
notifications.sendInviteNotification(entity)
elif entity.status == 'new':
# this is a request
- # TODO(Lennard) Create a new request message
- pass
+ notifications.sendNewRequestNotification(entity)
super(Logic, self)._onCreate(entity)
@@ -87,8 +86,7 @@
notifications.sendInviteNotification(entity)
elif value == 'new':
# this is a request
- # TODO(Lennard) Create a new request message
- pass
+ notifications.sendNewRequestNotification(entity)
return super(Logic, self)._updateField(entity, entity_properties, name)
--- a/app/soc/views/models/role.py Fri Jul 24 20:57:53 2009 +0200
+++ b/app/soc/views/models/role.py Fri Jul 24 21:00:04 2009 +0200
@@ -558,9 +558,6 @@
# create the request entity
request_logic.logic.updateOrCreateFromKeyName(request_fields, key_name)
- # TODO(ljvderijk): send out a message to alert the users
- # able to process this request
-
# redirect to requests overview
return http.HttpResponseRedirect('/user/requests')