Multiple condition splicing
There are a couple ways, but probably the one I recommend for dynamically building up a query is to use reduce:

```python

exprs = []
if name:
    exprs.append(ProductType.name == name)
if other:
    exprs.append(ProductType.other == other)

if exprs:
    query = query.where(reduce(operator.and_, exprs))
```

Since you're using the same operator (AND) you can also just chain the calls:

```python

query = ProductType.select()
if name:
    query = query.where(ProductType.name == name)
if other:
    query = query.where(ProductType.other == other)
...
``` thanks!
Sometimes the front end will pass an empty string, if where condition like this:
```
ProductType.demand_side == ""
```
will not find results, so I used the following code

```python
name = current_schema_data.get('name')
demand_side = current_schema_data.get('demand_side')

expression = 1
if name:
    expression &= (ProductType.product_name == name)

if demand_side:
    expression &= (ProductType.demand_side == demand_side)

sql = ProductType.select().where(expression)
print(sql)
```

```
SELECT `t1`.`id`, `t1`.`create_time`, `t1`.`update_time`, `t1`.`product_name`, `t1`.`fk_organization_id`, `t1`.`unit`, `t1`.`type`, `t1`.`calc_type`, `t1`.`demand_side` FROM `product_type` AS `t1` WHERE (1 AND (`t1`.`demand_side` = '34')) LIMIT 100 OFFSET 0
```

It always has `Where(1 and FOO)` or `Where 1`, How to remove it?
I have try using `expression = None`, But the results it found are all empty
