def clone(model):
    """
    Clones the given model and removes it's primary key
    :param model:
    :return:
    """
    db.session.expunge(model)
    make_transient(model)
    model.id = None
    return model

    Clones the given model and removes it's primary key
    :param model:
    :return:
    
lemur/database.py