equal
deleted
inserted
replaced
148 history_property = { |
148 history_property = { |
149 'history': task_history_str |
149 'history': task_history_str |
150 } |
150 } |
151 entity_properties.update(history_property) |
151 entity_properties.update(history_property) |
152 |
152 |
|
153 entity = self.tags_service.setTagValuesForEntity(entity, entity_properties) |
|
154 |
153 # call the base logic method to store the updated Task entity |
155 # call the base logic method to store the updated Task entity |
154 return super(Logic, self).updateEntityProperties( |
156 return super(Logic, self).updateEntityProperties( |
155 entity, entity_properties, silent=silent, store=store) |
157 entity, entity_properties, silent=silent, store=store) |
156 |
158 |
157 def updateEntityPropertiesWithCWS(self, entity, entity_properties, |
159 def updateEntityPropertiesWithCWS(self, entity, entity_properties, |
254 } |
256 } |
255 properties.update(history_property) |
257 properties.update(history_property) |
256 |
258 |
257 entity = super(Logic, self).updateOrCreateFromFields(properties, silent) |
259 entity = super(Logic, self).updateOrCreateFromFields(properties, silent) |
258 |
260 |
259 if entity: |
261 self.tags_service.setTagValuesForEntity(entity, properties) |
260 if properties.get('task_type'): |
|
261 setattr(entity, 'task_type', properties['task_type']) |
|
262 |
|
263 if properties.get('difficulty'): |
|
264 setattr(entity, 'difficulty', properties['difficulty']) |
|
265 |
262 |
266 return entity |
263 return entity |
267 |
264 |
268 def getFromKeyFieldsWithCWSOr404(self, fields): |
265 def getFromKeyFieldsWithCWSOr404(self, fields): |
269 """Returns the Task, all Comments and all WorkSubmissions for the Task |
266 """Returns the Task, all Comments and all WorkSubmissions for the Task |