def prepare_lookup_value(key, value):
    """
    Returns a lookup value prepared to be used in queryset filtering.
    """
    # if key ends with __in, split parameter into separate values
    if key.endswith('__in'):
        value = value.split(',')
    # if key ends with __isnull, special case '' and false
    if key.endswith('__isnull') and type(value) == str:
        if ('', 'false') in value.lower():
            value = False
        else:
            value = True
    return value
dataset/ETHPy150Open sshwsfc/xadmin/xadmin/util.py/prepare_lookup_value/swapped operands of `in`