@gen.coroutine
def PostComment(client, obj_store, user_id, device_id, request):
 headers = request.pop('headers')
 activity = request.pop('activity')
 viewpoint_id = request['viewpoint_id']
 (yield Activity.VerifyActivityId(client, user_id, device_id, activity['activity_id']))
 (yield Comment.VerifyCommentId(client, user_id, device_id, request['comment_id']))
 request = {'headers': headers, 'user_id': user_id, 'activity': activity, 'comment': request}
 (yield gen.Task(Operation.CreateAndExecute, client, user_id, device_id, 'PostCommentOperation.Execute', request))
 logging.info(('POST COMMENT: user: %d, device: %d, viewpoint: %s' % (user_id, device_id, viewpoint_id)))
 raise gen.Return({})

@ gen . coroutine def PostComment ( client , obj_store , user_id , device_id , request ) : headers = request . pop ( 'headers' ) activity = request . pop ( 'activity' ) viewpoint_id = request [ 'viewpoint_id' ] ( yield Activity . VerifyActivityId ( client , user_id , device_id , activity [ 'activity_id' ] ) ) ( yield Comment . VerifyCommentId ( client , user_id , device_id , request [ 'comment_id' ] ) ) request = { 'headers' : headers , 'user_id' : user_id , 'activity' : activity , 'comment' : request } ( yield gen . Task ( Operation . CreateAndExecute , client , user_id , device_id , 'PostCommentOperation.Execute' , request ) ) logging . info ( ( 'POST COMMENT: user: %d, device: %d, viewpoint: %s' % ( user_id , device_id , viewpoint_id ) ) ) raise gen . Return ( { } )
adds a new comment to an existing viewpoint .