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
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
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