Fixed an error with the task_history not being loaded when it was empty.
authorLennard de Rijk <ljvderijk@gmail.com>
Sun, 08 Nov 2009 11:54:44 -0800
changeset 3080 30a33926ab91
parent 3079 c491d96dce2c
child 3081 14077185c46e
Fixed an error with the task_history not being loaded when it was empty.
app/soc/modules/ghop/logic/models/task.py
--- a/app/soc/modules/ghop/logic/models/task.py	Wed Nov 04 21:37:44 2009 +0100
+++ b/app/soc/modules/ghop/logic/models/task.py	Sun Nov 08 11:54:44 2009 -0800
@@ -113,8 +113,10 @@
           # initialize history
           task_history = {}
       # extract the existing json history from the entity to update it
+    elif entity.history:
+      task_history = simplejson.loads(entity.history)
     else:
-      task_history = simplejson.loads(entity.history)
+      task_history = {}
 
       # we construct history for only changed entity properties
       if entity_properties: