app/soc/views/models/role.py
changeset 1196 11dbdf12d7c2
parent 1195 cbef45d75942
child 1218 569a3fe9cb88
--- a/app/soc/views/models/role.py	Tue Feb 03 08:25:47 2009 +0000
+++ b/app/soc/views/models/role.py	Tue Feb 03 08:33:46 2009 +0000
@@ -561,11 +561,14 @@
       if get_dict['status'] in ['group_accepted', 'rejected', 'ignored']:
         # update the request_entity and redirect away from this page
         request_status = get_dict['status']
-        request_logic.logic.updateEntityProperties(request_entity, {
-            'status': get_dict['status']})
 
-        if request_status == 'group_accepted':
-          notifications_helper.sendInviteNotification(request_entity)
+        # only update when the status is changing
+        if request_status != request_entity.status:
+          request_logic.logic.updateEntityProperties(request_entity, {
+              'status': get_dict['status']})
+
+          if request_status == 'group_accepted':
+            notifications_helper.sendInviteNotification(request_entity)
 
         group_view = params.get('group_view')
         if not group_view: