def _read_deleted_filter(query, db_model, deleted):
    if db_model.__table__.columns not in 'deleted':
        raise ValueError(_("There is no `deleted` column in `%s` table. "
                           "Project doesn't use soft-deleted feature.")
                         % db_model.__name__)

    default_deleted_value = db_model.__table__.c.deleted.default.arg
    if deleted:
        query = query.filter(db_model.deleted != default_deleted_value)
    else:
        query = query.filter(db_model.deleted == default_deleted_value)
    return query
dataset/ETHPy150Open openstack/oslo.db/oslo_db/sqlalchemy/utils.py/_read_deleted_filter/swapped operands of `not in`