示例#1
0
def update_raw_picture(facebook_id, update_query):
    global RawPictures
    raw_picture = get_raw_picture_by(facebook_id)
    if not raw_picture:
        return False
    raw_picture.update(update_query)
    RawPictures.save(raw_picture)
    return True
示例#2
0
def update_raw_picture(facebook_id, update_query):
    global RawPictures
    raw_picture = get_raw_picture_by(facebook_id)
    if not raw_picture:
        return False
    raw_picture.update(update_query)
    RawPictures.save(raw_picture)
    return True
示例#3
0
def mark_raw_picture_confirmed(facebook_id, picture_width, picture_height):
    global RawPictures
    # TODO: check width and height boundaries
    raw_picture = RawPictures.find_one({_FACEBOOK_ID: facebook_id})
    raw_picture.update({'type': FACE_PICTURE,
                        'width': picture_width,
                        'height': picture_height})
    RawPictures.save(raw_picture)
    return raw_picture
示例#4
0
def mark_raw_picture_confirmed(facebook_id, picture_width, picture_height):
    global RawPictures
    # TODO: check width and height boundaries
    raw_picture = RawPictures.find_one({_FACEBOOK_ID: facebook_id})
    raw_picture.update({
        'type': FACE_PICTURE,
        'width': picture_width,
        'height': picture_height
    })
    RawPictures.save(raw_picture)
    return raw_picture