800 logic.getFromKeyFieldsWithCWSOr404(kwargs)) |
800 logic.getFromKeyFieldsWithCWSOr404(kwargs)) |
801 except out_of_band.Error, error: |
801 except out_of_band.Error, error: |
802 return helper.responses.errorResponse( |
802 return helper.responses.errorResponse( |
803 error, request, template=params['error_public'], context=context) |
803 error, request, template=params['error_public'], context=context) |
804 |
804 |
805 if entity.status in ['Claimed', 'NeedsReview', |
805 # because we are not sure if the Task API has called this for us we do it |
806 'ActionNeeded', 'NeedsWork']: |
806 entity, comment_entity = ghop_task_logic.logic.updateTaskStatus(entity) |
807 entity, comment_entity, ws_entity = ( |
807 if comment_entity: |
808 ghop_task_logic.logic.updateTaskStatus(entity)) |
808 comment_entities.append(comment_entity) |
809 if comment_entity: |
|
810 comment_entities.append(comment_entity) |
|
811 if ws_entity: |
|
812 ws_entities.append(ws_entity) |
|
813 |
809 |
814 context['entity'] = entity |
810 context['entity'] = entity |
815 context['entity_key_name'] = entity.key().id_or_name() |
811 context['entity_key_name'] = entity.key().id_or_name() |
816 context['entity_type'] = params['name'] |
812 context['entity_type'] = params['name'] |
817 context['entity_type_url'] = params['url_name'] |
813 context['entity_type_url'] = params['url_name'] |