muffin-rest 5.1.5__tar.gz → 5.1.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/PKG-INFO +1 -1
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/peewee/filters.py +2 -2
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/pyproject.toml +1 -1
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/LICENSE +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/README.rst +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/__init__.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/api.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/errors.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/filters.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/handler.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/mongo/__init__.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/mongo/filters.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/mongo/schema.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/mongo/sorting.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/mongo/types.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/mongo/utils.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/openapi.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/options.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/peewee/__init__.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/peewee/handler.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/peewee/openapi.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/peewee/options.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/peewee/schemas.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/peewee/sorting.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/peewee/types.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/peewee/utils.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/py.typed +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/redoc.html +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/sorting.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/sqlalchemy/__init__.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/sqlalchemy/filters.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/sqlalchemy/sorting.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/sqlalchemy/types.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/swagger.html +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/types.py +0 -0
- {muffin_rest-5.1.5 → muffin_rest-5.1.6}/muffin_rest/utils.py +0 -0
|
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
import operator
|
|
5
5
|
from typing import Any, Callable, Tuple, Type, Union, cast
|
|
6
6
|
|
|
7
|
-
from peewee import Field, ModelSelect
|
|
7
|
+
from peewee import ColumnBase, Field, ModelSelect
|
|
8
8
|
|
|
9
9
|
from muffin_rest.filters import Filter, Filters
|
|
10
10
|
|
|
@@ -37,7 +37,7 @@ class PWFilter(Filter):
|
|
|
37
37
|
|
|
38
38
|
def query(self, qs: ModelSelect, column: Field, *ops: Tuple, **_) -> ModelSelect:
|
|
39
39
|
"""Filter a query."""
|
|
40
|
-
if isinstance(column,
|
|
40
|
+
if isinstance(column, ColumnBase):
|
|
41
41
|
return cast(ModelSelect, qs.where(*[op(column, val) for op, val in ops]))
|
|
42
42
|
|
|
43
43
|
return qs
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|