def correct_boolean_int(expression_str):
    """
    Replace 'deleted == x' where x in [0, None] by 'deleted != 1'.
    :param expression_str: a string expression containing boolean conditions
    :return: a modified string expression
    """
    expression_str = expression_str.replace('___deleted == 0',
        '___deleted != 1')
    return expression_str
