I hate how Hg handles unsynched remote changes
authorSverre Rabbelier <srabbelier@gmail.com>
Sun, 27 Sep 2009 23:34:21 +0200
changeset 2983 04689c9414a3
parent 2982 eeee8c854438 (diff)
parent 2980 cbfd8e12527a (current diff)
child 2984 2b7ea1f2629a
child 2985 f1ed0ecd0128
I hate how Hg handles unsynched remote changes
--- a/app/soc/modules/ghop/logic/models/task.py	Sun Sep 27 23:31:39 2009 +0200
+++ b/app/soc/modules/ghop/logic/models/task.py	Sun Sep 27 23:34:21 2009 +0200
@@ -141,9 +141,9 @@
           }
       entity_properties.update(history_property)
 
-      # call the base logic method to store the updated Task entity
-      return super(Logic, self).updateEntityProperties(
-          entity, entity_properties, siltent=silent, store=store)
+    # call the base logic method to store the updated Task entity
+    return super(Logic, self).updateEntityProperties(
+        entity, entity_properties, silent=silent, store=store)
 
   def updateEntityPropertiesWithCWS(self, entity, entity_properties,
                                     comment_properties=None, 
--- a/app/soc/modules/ghop/views/models/task.py	Sun Sep 27 23:31:39 2009 +0200
+++ b/app/soc/modules/ghop/views/models/task.py	Sun Sep 27 23:34:21 2009 +0200
@@ -802,14 +802,10 @@
       return helper.responses.errorResponse(
           error, request, template=params['error_public'], context=context)
 
-    if entity.status in ['Claimed', 'NeedsReview',
-                         'ActionNeeded', 'NeedsWork']:
-      entity, comment_entity, ws_entity = (
-          ghop_task_logic.logic.updateTaskStatus(entity))
-      if comment_entity:
-        comment_entities.append(comment_entity)
-      if ws_entity:
-        ws_entities.append(ws_entity)
+    # because we are not sure if the Task API has called this for us we do it
+    entity, comment_entity = ghop_task_logic.logic.updateTaskStatus(entity)
+    if comment_entity:
+      comment_entities.append(comment_entity)
 
     context['entity'] = entity
     context['entity_key_name'] = entity.key().id_or_name()