app/soc/modules/ghop/logic/models/task.py
changeset 3080 30a33926ab91
parent 3059 14421976288a
child 3091 a48f4e860f7b
equal deleted inserted replaced
3079:c491d96dce2c 3080:30a33926ab91
   111             history['modified_by'] = entity.modified_by.key().name()
   111             history['modified_by'] = entity.modified_by.key().name()
   112 
   112 
   113           # initialize history
   113           # initialize history
   114           task_history = {}
   114           task_history = {}
   115       # extract the existing json history from the entity to update it
   115       # extract the existing json history from the entity to update it
       
   116     elif entity.history:
       
   117       task_history = simplejson.loads(entity.history)
   116     else:
   118     else:
   117       task_history = simplejson.loads(entity.history)
   119       task_history = {}
   118 
   120 
   119       # we construct history for only changed entity properties
   121       # we construct history for only changed entity properties
   120       if entity_properties:
   122       if entity_properties:
   121         for property in entity_properties:
   123         for property in entity_properties:
   122           changed_val = getattr(entity, property)
   124           changed_val = getattr(entity, property)