def migrate_050_to_051(session):
    """Set time_out field of all flagged
    timesheet entries to Null.
    """
    entries_to_update = session.query(Entry).filter(
            Entry.forgot_sign_out.is_(True)).filter(
            Entry.time_out.isnot(None))

    for entry in entries_to_update:
        entry.time_out = None
        logging.info('Entry updated {}'.format(entry.uuid))
        logging.debug(entry.uuid)
        session.add(entry)
Set time_out field of all flagged
    timesheet entries to Null.