@gen.coroutine
def UpdatePhoto(client, obj_store, user_id, device_id, request):
 request['user_id'] = user_id
 if (request['headers']['original_version'] >= Message.ADD_OP_HEADER_VERSION):
  (yield Activity.VerifyActivityId(client, user_id, device_id, request['activity']['activity_id']))
 else:
  (yield Activity.VerifyActivityId(client, user_id, 0, request['activity']['activity_id']))
 request = {'headers': request.pop('headers'), 'act_dict': request.pop('activity'), 'ph_dict': request}
 (yield gen.Task(Operation.CreateAndExecute, client, user_id, device_id, 'Photo.UpdateOperation', request))
 logging.info(('UPDATE PHOTO: user: %d, device: %d, photo: %s' % (user_id, device_id, request['ph_dict']['photo_id'])))
 raise gen.Return({})

@ gen . coroutine def UpdatePhoto ( client , obj_store , user_id , device_id , request ) : request [ 'user_id' ] = user_id if ( request [ 'headers' ] [ 'original_version' ] >= Message . ADD_OP_HEADER_VERSION ) : ( yield Activity . VerifyActivityId ( client , user_id , device_id , request [ 'activity' ] [ 'activity_id' ] ) ) else : ( yield Activity . VerifyActivityId ( client , user_id , 0 , request [ 'activity' ] [ 'activity_id' ] ) ) request = { 'headers' : request . pop ( 'headers' ) , 'act_dict' : request . pop ( 'activity' ) , 'ph_dict' : request } ( yield gen . Task ( Operation . CreateAndExecute , client , user_id , device_id , 'Photo.UpdateOperation' , request ) ) logging . info ( ( 'UPDATE PHOTO: user: %d, device: %d, photo: %s' % ( user_id , device_id , request [ 'ph_dict' ] [ 'photo_id' ] ) ) ) raise gen . Return ( { } )
updates photo metadata .