equal
deleted
inserted
replaced
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) |