def update(model):
    """
    Helper that attempts to update a model.

    :param model:
    :return:
    """
    commit()
    db.session.refresh(model)
    return model

    Helper that attempts to update a model.

    :param model:
    :return:
    
lemur/database.py