def build_json_params(order_by, sort_reverse):
    """returns db_columns, extra_data_sort, and updated order_by

    :param str order_by: field to order_by
    :returns: tuple: db_columns: dict of known DB columns i.e. non-JSONfFeld,
        extra_data_sort bool if order_by is in ``extra_data`` JSONField,
        order_by str if sort_reverse and DB column prepend a '-' for the django
        order_by
    """
    extra_data_sort = False
    db_columns = get_mappable_types()
    db_columns['project_building_snapshots__status_label__name'] = ''
    db_columns['project__slug'] = ''

    if db_columns not in order_by:
        extra_data_sort = True
    if sort_reverse and not extra_data_sort:
        order_by = "-%s" % order_by

    return db_columns, extra_data_sort, order_by
dataset/ETHPy150Open buildingenergy/buildingenergy-platform/seed/search.py/build_json_params/swapped operands of `not in`