app/soc/views/models/group_app.py
changeset 1196 11dbdf12d7c2
parent 1139 7a6f94ffcc87
child 1202 8060f33a164f
--- a/app/soc/views/models/group_app.py	Tue Feb 03 08:25:47 2009 +0000
+++ b/app/soc/views/models/group_app.py	Tue Feb 03 08:33:46 2009 +0000
@@ -257,13 +257,16 @@
 
       if status_value in ['accepted', 'rejected', 'ignored']:
         # this application has been properly reviewed update the status
-        fields = {'status' : status_value}
 
-        self._logic.updateEntityProperties(entity, fields)
+        # only update if the status changes
+        if entity.status != status_value:
+          fields = {'status' : status_value}
 
-        if status_value == 'accepted':
-          # the application has been accepted send out a notification
-          notifications.sendNewGroupNotification(entity, params)
+          self._logic.updateEntityProperties(entity, fields)
+
+          if status_value == 'accepted':
+            # the application has been accepted send out a notification
+            notifications.sendNewGroupNotification(entity, params)
 
         return self.reviewOverview(request, access_type,
             page_name=page_name, params=params, **kwargs)